Permalink
Browse files

Fix pinch events all being set to pinchstart

  • Loading branch information...
Benjamin den Boer
Benjamin den Boer committed Jan 21, 2016
1 parent fde7c54 commit c7c99d1f3bbf5cd8ad543638c54dbaed2ae123c3
Showing with 5 additions and 5 deletions.
  1. +5 −5 framer/LayerPinchable.coffee
@@ -5,8 +5,8 @@ Utils = require "./Utils"
{Gestures} = require "./Gestures"
Events.PinchStart = "pinchstart"
Events.PinchEnd = "pinchstart"
Events.Pinch = "pinchstart"
Events.PinchEnd = "pinchend"
Events.Pinch = "pinch"
Events.RotateStart = "rotatestart"
Events.Rotate = "rotate"
Events.RotateEnd = "rotateend"
@@ -52,12 +52,12 @@ class exports.LayerPinchable extends BaseClass
@emit(Events.PinchStart, event)
@emit(Events.ScaleStart, event) if @scale
@emit(Events.RotateStart, event) if @rotate
_pinch: (event) =>
return unless event.pointers.length is 2
return unless @enabled
pointA =
x: event.pointers[0].pageX
y: event.pointers[0].pageY
@@ -108,4 +108,4 @@ class exports.LayerPinchable extends BaseClass
onRotateEnd: (cb) -> @on(Events.RotateEnd, cb)
onScaleStart: (cb) -> @on(Events.ScaleStart, cb)
onScale: (cb) -> @on(Events.Scale, cb)
onScaleEnd: (cb) -> @on(Events.ScaleEnd, cb)
onScaleEnd: (cb) -> @on(Events.ScaleEnd, cb)

0 comments on commit c7c99d1

Please sign in to comment.