onmousedown and onmouseup implementation in control scripts

Anything you want added or changed in future versions of ZoneMinder? Post here and there's a chance it will get in! Search to make sure it hasn't already been requested.
Post Reply
alabamatoy
Posts: 126
Joined: Sun Jun 05, 2016 2:53 pm

onmousedown and onmouseup implementation in control scripts

Post by alabamatoy » Mon Mar 13, 2017 8:45 pm

I would like to have onmousedown (click and hold) and onmouseup (let go of click and hold) actions passed from the camera control interface to the control scripts. Clicking the "up" arrow repeatedly in order to make the camera tilt up one tiny increment at a time is a PITA - it would be nice to tilt up continuously for onmousedown and keep tilting until onmouseup. Obviously same for left/right and zoom/tele.

If this is already implemented, I couldnt figure out how to capture it with the control script, all I could figure out was a arrow click. If its *not* implemented, is there a reason? I will try to modify the included view file to see if I can make it work, unless someone else is already chasing this.

???

alabamatoy
Posts: 126
Joined: Sun Jun 05, 2016 2:53 pm

Re: onmousedown and onmouseup implementation in control scripts

Post by alabamatoy » Mon Jun 05, 2017 12:44 am

I have this implemented if anyone cares. It only works with my Amcrest PTZ cameras control script, but the changes to other control scripts shouldn't be that difficult. It requires replacement of the CSS control "include" file along with a new version of the control script.

This allows "press to move, release to stop" type mouse functionality for left/right/up/down and tele/wide controls.

I would like to see an option, perhaps, in the config which would allow selection of this functionality....but I dont know how to code that.

I will post the code if anyone wants it.

alabamatoy
Posts: 126
Joined: Sun Jun 05, 2016 2:53 pm

Re: onmousedown and onmouseup implementation in control scripts

Post by alabamatoy » Mon Nov 13, 2017 3:49 pm

Just talking to myself again...

Apparently onmousedown and onmouseup do not work on Android, at least not in any browser I have yet found. For more info, see https://stackoverflow.com/questions/475 ... on-android

So this whole press-and-hold-to-pan approach doesnt work on an Android. Works nicely on a PC, though.

User avatar
iconnor
Posts: 535
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: onmousedown and onmouseup implementation in control scripts

Post by iconnor » Tue Nov 28, 2017 11:52 am

I think on mobile it uses a different action called ontouch

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest