This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Mike Feldstein
Posted Aug 13 - Read on Facebook

Differentiating between a click and ending a drag: It looks like Events.Click is just a "mouseup" event. This triggers a click even when i just drag a layer around and stop. Is there a way to not trigger the Events.Click event after a drag?


Mike Feldstein

Alternatively, is there a way to have a parent layer prevent clicks to it's child views? I basically have a draggable panel with 4 buttons in it. If i drag the panel around and mouse up it will click whatever button is under your finger.

Alex Hazel

myLayer.on event mouseup (event) ->

Alex Hazel

I think that is what you need? I am not sure though...something along those lines?? I know this question has been asked in this group in the past...

Stephen Crowley

Yeah... I just have the layer do nothing on click myLayer.on Event Click, (event) ->

Mike Feldstein

So i ended up setting layer.ignoreEvents while dragging. The problem was that the drag end event is "dragend" not "mouseup"

Alex Hazel

Here is the event documentation, just in case:

Read the entire post on Facebook