The diagonal arrows didn't work even though diagonal movement is supported by the script.
This I fixed in /usr/share/zoneminder/www/include/control_functions.php line 12:
Code: Select all
-if ( preg_match( '/^([a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)+$/', $_REQUEST['control'], $matches ) )
+if ( preg_match( '/^([a-z]+)([A-Z][a-z]+)([A-Za-z]+)+$/', $_REQUEST['control'], $matches ) )
The new regex matches "UpLeft" (and the other directions) as it should.
Also, the left arrow worked backwards. Clicking near the base of the arrow produced a large movement, while clicking near the tip produced a small movement. This problem was in /usr/share/zoneminder/www/skins/classic/includes/control_functions.php line 256:
Code: Select all
-<div class="arrowBtn leftBtn<?php echo $hasPan?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveLeft'] ?>',event,1,0)"></div>
+<div class="arrowBtn leftBtn<?php echo $hasPan?'':' invisible' ?>" onclick="controlCmd('<?php echo $cmds['MoveLeft'] ?>',event,-1,0)"></div>
I hope these fixes are of use to somebody.
I would also like to get mapped movement working. I've seen multiple references that suggest that when mapped movement is supported, the camera can moved by clicking on the image. However, clicking on the image just zooms it in. I have "can move mapped" checked. I looked through my config and couldn't find a relevant option.
Has that feature been removed from ZM?