Permalink
Browse files

Fix bug in touch emulator when mouse wasn't moved yet

  • Loading branch information...
koenbok committed May 1, 2016
1 parent 445b074 commit 5b548b4b890d9768d78a0552af4bdfdc233251f1
Showing with 8 additions and 1 deletion.
  1. +8 −1 framer/Extras/TouchEmulator.coffee
@@ -47,7 +47,7 @@ class TouchEmulator extends BaseClass
@keyPinchCode = 18 # Alt
@keyPanCode = 91 # Command
@context = new Framer.Context name:"TouchEmulator"
@context = new Framer.Context(name:"TouchEmulator")
@context._element.style.zIndex = 10000
@wrap = @context.domEventManager.wrap
@@ -174,6 +174,13 @@ class TouchEmulator extends BaseClass
# Utilities
showTouchCursor: ->
# If the mouse did not move yet, we capture the point here
if not @point
@point =
x: event.pageX
y: event.pageY
@touchPointLayer.animateStop()
@touchPointLayer.midX = @point.x
@touchPointLayer.midY = @point.y

0 comments on commit 5b548b4

Please sign in to comment.