 		layers.reverse()
 
 		for parent in layers
-			factorX = if parent._parentOrContext() then parent._parentOrContext().screenScaleX() else 1
-			factorY = if parent._parentOrContext() then parent._parentOrContext().screenScaleY() else 1
-			layerScaledFrame = parent.scaledFrame()
+			p = parentOrContext(parent)
+			factorX = p?.screenScaleX?() ? 1
+			factorY = p?.screenScaleY?() ? 1
+			layerScaledFrame = parent.scaledFrame?() ? {x: 0, y: 0}
 			frame.x += layerScaledFrame.x * factorX
 			frame.y += layerScaledFrame.y * factorY
 

		importable: true
		exportable: false
		get: ->
			return Utils.convertFrameToContext(@frame, @, true, false)
		set: (frame) ->
			@frame = Utils.convertFrameFromContext(frame, @, true, false)


		scale = 1
		scale = @scale * @scaleX if self
		for parent in @ancestors(context=true)
			if parent.scale?
				scale *= parent.scale
			if parent.scaleX?
				scale *= parent.scaleX
		return scale

	canvasScaleY: (self=true) ->
		scale = 1
		scale = @scale * @scaleY if self
		for parent in @ancestors(context=true)
			if parent.scale?
				scale *= parent.scale
			if parent.scaleY?
				scale *= parent.scaleY
		return scale

	screenScaleX: (self=true) ->
		scale = 1
		scale = @scale * @scaleX if self
		for parent in @ancestors(context=false)
			if parent.scale?
				scale *= parent.scale
			if parent.scaleX?
				scale *= parent.scaleX
		return scale

	screenScaleY: (self=true) ->
		scale = 1
		scale = @scale * @scaleY if self
		for parent in @ancestors(context=false)
			if parent.scale?
				scale *= parent.scale
			if parent.scaleY?
				scale *= parent.scaleY
		return scale


