Permalink
Browse files

Make scroll and draggable work in layer names again

  • Loading branch information...
koenbok committed Sep 25, 2014
1 parent bf0e721 commit 1e644259f017678157a07497b899c2496ef03916
Showing with 9 additions and 3 deletions.
  1. +9 −3 framer/Importer.coffee
View
@@ -76,9 +76,7 @@ class exports.Importer
if info.maskFrame
layerInfo.frame = info.maskFrame
layerInfo.clip = true
# Todo: smart stuff for paging and scroll views
# Figure out what the super layer should be. If this layer has a contentLayer
# (like a scroll view) we attach it to that instead.
if superLayer?.contentLayer
@@ -90,6 +88,14 @@ class exports.Importer
layer = new LayerClass layerInfo
layer.name = layerInfo.name
# Set scroll to true if scroll is in the layer name
if layerInfo.name.toLowerCase().indexOf("scroll") != -1
layer.scroll = true
# Set draggable enabled if draggable is in the name
if layerInfo.name.toLowerCase().indexOf("draggable") != -1
layer.draggable.enabled = true
# A layer without an image, mask or sublayers should be zero
if not layer.image and not info.children.length and not info.maskFrame
layer.frame = new Frame

0 comments on commit 1e64425

Please sign in to comment.