Permalink
Browse files

Fix bug for invisible frames

  • Loading branch information...
koenbok committed Jul 25, 2016
1 parent f0f7e2d commit c9971021e510c2024c19f9524e5255ad4a0bd87b
Showing with 12 additions and 13 deletions.
  1. +12 −13 framer/Layer.coffee
View
@@ -1206,18 +1206,6 @@ class exports.Layer extends BaseClass
##############################################################
## HINT
_visibleFrame: ->
# Figure out the frame we want to show the hint in, if any of the
# parent layers clip, we need to intersect the rectangle with it.
frame = @canvasFrame
for parent in @ancestors(context=true)
if parent.clip
frame = Utils.frameIntersection(frame, parent.canvasFrame)
return frame
_showHint: (targetLayer) ->
# If this layer isnt visible we can just exit
@@ -1235,7 +1223,18 @@ class exports.Layer extends BaseClass
layer._showHint(targetLayer) for layer in @children
return null
frame = @_visibleFrame()
# Figure out the frame we want to show the hint in, if any of the
# parent layers clip, we need to intersect the rectangle with it.
frame = @canvasFrame
return unless frame
for parent in @ancestors(context=true)
if parent.clip
parentFrame = parent.canvasFrame
if parentFrame
frame = Utils.frameIntersection(frame, parent.canvasFrame)
return unless frame
# Show the actual hint

0 comments on commit c997102

Please sign in to comment.