Perspective - distinguish between single click and double click

I have a multi-zone conveyor displayed on my perspective view where a standard user can click to bring up a popup giving them control over that conveyor as a whole.

A maintenance user, when logged in, should be able to single-click on that conveyor to bring up the same popup, or double click on any one zone of that conveyor to bring up a popup with controls for that individual zone.

I can't just attach an onClick script or an onDoubleClick script to the zones, because the onClick script fires immediately without waiting to see if a second one is incoming. It seems that in Vision there is a clickCount property available for this application (ref: Distinguish between single and double click), but it doesn't seem to exist in Perspective.

How can I achieve this in perspective?

event.detail inside the onclick event
It will still trigger both event though...

You dont want something to have both a single and double click event
Create a seperate button for the popup as a whole, you dont want popups to open on single click on an image. (unless that image looks like a button)

I've changed my approach to use a right click and context menu selection method. It's working but with a couple of fine tuning niggles that I've documented in a new thread here

1 Like