Permalink
Browse files

Add back screen scale functions

  • Loading branch information...
koenbok committed Oct 27, 2014
1 parent 2e07617 commit a82c4fbaec76a913bd07fac12153df286c3a1bfb
Showing with 20 additions and 0 deletions.
  1. +20 −0 framer/Layer.coffee
@@ -316,6 +316,26 @@ class exports.Layer extends BaseClass
# TODO: I don't think this is correct yet because you have to account
# for scale+origin and rotation+origin each step in the layer hierarchy.
screenOriginX = ->
if @_superOrParentLayer()
return @_superOrParentLayer().screenOriginX()
return @originX
screenOriginY = ->
if @_superOrParentLayer()
return @_superOrParentLayer().screenOriginY()
return @originY
screenScaleX: ->
if @_superOrParentLayer()
return @_superOrParentLayer().screenScaleX()
return @scale * @scaleX
screenScaleY: ->
if @_superOrParentLayer()
return @_superOrParentLayer().screenScaleY()
return @scale * @scaleY
screenScale: ->
scale = @scale
for superLayer in @superLayers()

0 comments on commit a82c4fb

Please sign in to comment.