0

I'm trying to add a sub layer to the main set of layers in a framer prototype:

myLayers = Framer.Importer.load("imported/some-psd")

layer = new Layer();
myLayers.addSubLayer(layer);

But I get the following error:

Uncaught TypeError: undefined is not a function app.js:4
(anonymous function)
Charles
  • 50,943
  • 13
  • 104
  • 142
ed209
  • 11,075
  • 19
  • 66
  • 82

1 Answers1

2

Try adding the superLayer property to the layer var, rather than adding layer to myLayers as a subLayer

In other words:

myLayers = Framer.Importer.load("import/some-psd")
layer = new Layer()
    superLayer: myLayers

Or

layer.superLayer = myLayers
Adam
  • 191
  • 1
  • 2
  • 14