Permalink
Browse files

Merge pull request #547 from koenbok/fix-slider-screenframe

Fix slider calculations
  • Loading branch information...
nvh committed Oct 27, 2017
2 parents 54e9bcb + 07bdee9 commit 0f34f5cd37de158ab1e82a15556a979f941d01e9
Showing with 2 additions and 2 deletions.
  1. +2 −2 framer/Components/SliderComponent.coffee
@@ -96,11 +96,11 @@ class exports.SliderComponent extends Layer
if @width > @height
touchX = Events.touchEvent(event).clientX - Screen.canvasFrame.x
scaleX = @canvasScaleX()
@value = @valueForPoint(touchX / scaleX - @x)
@value = @valueForPoint(touchX / scaleX - @screenFrame.x)
else
touchY = Events.touchEvent(event).clientY - Screen.canvasFrame.y
scaleY = @canvasScaleY()
@value = @valueForPoint(touchY / scaleY - @y)
@value = @valueForPoint(touchY / scaleY - @screenFrame.y)
@knob.draggable._touchStart(event)
@_updateValue()

0 comments on commit 0f34f5c

Please sign in to comment.