Hi,Is there any way to trigger a double click event on framer? Like double click on images to zoom in.
You need a variable to count the clicks.
clickCount = 0layer.on Events.click, -> clickCount += 1 if clickCount >= 2 then # do stuff
On top of Ians solution, you would probably want a timer to limit the double click delay (right now, every click after the first one will trigger the double-click action)
Yes, I forgot about the delay. Thank you!
Erik Edhagen Ian McClure Thank you. I'll try it. : )
Hint: use setTimeout after "clickCount +=1" and make the setTimeout callback reset clickCount to 0