Permalink
Browse files

Merge pull request #390 from koenbok/issue/2225

Fix all edge swipe gestures
  • Loading branch information...
koenbok committed Jul 28, 2016
2 parents b9e8d14 + 5258979 commit f3cfea65eacea12c05aa26489228848249483f5c
Showing with 4 additions and 6 deletions.
  1. +4 −6 framer/GestureInputRecognizer.coffee
@@ -237,16 +237,14 @@ class exports.GestureInputRecognizer
@_dispatchEvent("swipe#{direction}start", event)
swipeEdge = @_edgeForSwipeDirection(direction)
maxX = Utils.frameGetMaxX(Screen.canvasFrame)
maxY = Utils.frameGetMaxY(Screen.canvasFrame)
if swipeEdge is "top" and 0 < event.start.y - Screen.canvasFrame.y < GestureInputEdgeSwipeDistance
if swipeEdge is "top" and 0 < event.start.y < GestureInputEdgeSwipeDistance
@edgeswipedirectionstart(event)
if swipeEdge is "right" and maxX - GestureInputEdgeSwipeDistance < event.start.x < maxX
if swipeEdge is "right" and Screen.width - GestureInputEdgeSwipeDistance < event.start.x < Screen.width
@edgeswipedirectionstart(event)
if swipeEdge is "bottom" and maxY - GestureInputEdgeSwipeDistance < event.start.y < maxY
if swipeEdge is "bottom" and Screen.height - GestureInputEdgeSwipeDistance < event.start.y < Screen.height
@edgeswipedirectionstart(event)
if swipeEdge is "left" and 0 < event.start.x - Screen.canvasFrame.x < GestureInputEdgeSwipeDistance
if swipeEdge is "left" and 0 < event.start.x < GestureInputEdgeSwipeDistance
@edgeswipedirectionstart(event)
swipedirection: (event) =>

0 comments on commit f3cfea6

Please sign in to comment.