Skip to content

Commit

Permalink
Possible fix for images with direct mask in Sketch
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbok committed Feb 24, 2015
1 parent efc5aa4 commit 22c2e4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions framer/Importer.coffee
Expand Up @@ -76,6 +76,13 @@ class exports.Importer
if info.maskFrame
layerInfo.frame = info.maskFrame
layerInfo.clip = true

# Possible fix for images that have a mask in Sketch
# So if a layer without children has a mask, Sketch imports the full image
# That is whay we then take the image frame over the mask frame again
if superLayer?.clip and info.children.length is 0
layerInfo.frame = info.image.frame
layerInfo.clip = false

# Figure out what the super layer should be. If this layer has a contentLayer
# (like a scroll view) we attach it to that instead.
Expand Down

0 comments on commit 22c2e4e

Please sign in to comment.