PTZ Control bug - Pan Left arrow button reversed, with fix
Posted: Wed Aug 12, 2009 2:52 pm
I couldn't find any mention of this, so I apologize if this has already been covered.
I'm using ZM 1.24.2 with some PTZ cameras. I noticed that the left arrow (Pan Left) button is reversed... that is, the image of the arrow is fine... but when using absolute or relative movement, the button is reversing the input position. For example, when using relative control, clicking the base of the arrow is supposed to pan left a small amount, clicking the tip a large amount, and everywhere in between. This works fine with all other directions , including UpLeft and DownLeft diagonals, but it's reversed on the left arrow... i.e. the base moves far and the tip moves only slightly.
I traced it down to this line in [ZM_PATH_WEB]/skins/classic/includes/control_functions.php:
This line should read:
Note the "event,1,0" must be changed to "event,-1,0". After making this correction the control will behave as it should.
I'm using ZM 1.24.2 with some PTZ cameras. I noticed that the left arrow (Pan Left) button is reversed... that is, the image of the arrow is fine... but when using absolute or relative movement, the button is reversing the input position. For example, when using relative control, clicking the base of the arrow is supposed to pan left a small amount, clicking the tip a large amount, and everywhere in between. This works fine with all other directions , including UpLeft and DownLeft diagonals, but it's reversed on the left arrow... i.e. the base moves far and the tip moves only slightly.
I traced it down to this line in [ZM_PATH_WEB]/skins/classic/includes/control_functions.php:
Code: Select all
<div class="arrowBtn leftBtn<?= $hasPan?'':' invisible' ?>" onclick="controlCmd('<?= $cmds['MoveLeft'] ?>',event,1,0)"></div>
Code: Select all
<div class="arrowBtn leftBtn<?= $hasPan?'':' invisible' ?>" onclick="controlCmd('<?= $cmds['MoveLeft'] ?>',event,-1,0)"></div>