koenbok / Framer

Framer - Design Everything
https://framer.com
MIT License
5.84k stars 477 forks source link

Fix draggable for layer outside of Framer.CurrentContext #412

Open nvh opened 8 years ago

nvh commented 8 years ago

Reproduce:

Both the red and the green layer can be dragged normally

Observed:

The red layer that is outside of Framer.CurrentContext moves around to quickly (relative to the device scale)

Remarks:

This is due to the conversion of the eventPoint to Framer.CurrentContext that happens here: https://github.com/koenbok/Framer/blob/52589798b44e3c7e3f11928432a1c0757ddcb2fb/framer/GestureInputRecognizer.coffee#L330

koenbok commented 7 years ago

We should probably fix this in layer.emit because that is where the event and context come together.