Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Possible fix for images with direct mask in Sketch
- Loading branch information
Showing
with
7 additions
and
0 deletions.
-
+7
−0
framer/Importer.coffee
|
@@ -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. |
|
|