I've put video inside div, one zoom bar to zoom video and four buttons on each side to move video accordingly in left, right, top, bottom side after zooming.
The problem is, left and right button is working but top and bottom buttons do not move video. In Example, the video panning is not working on top and bottom side.
if (parseFloat(document.getElementById("MyVideo").style.top)<=0)
{
console.log(parseFloat(document.getElementById("MyVideo").style.top));
$("#MyVideo").css({"top":parseFloat(document.getElementById("MyVideo").style.top)+1+"%"});
Code link-
check the code in TOP and BOTTOM Functions.