TL;DR: Is there anyway to use the event 'Framer.CurrentContext.on "layer:create", (new layer) ->' with layers created in design tab?
I am using Layer.define to create some custom properties on the layer class, for example:
try Layer.define "enableHighlight",
____get: -> @_properties["enableHighlight"]
____set: (value) ->
[email protected]_properties["enableHighlight"] = value
Now i want that every time a new layer is created, this custom property is automatically assigned a default value. For this i am using:
Framer.CurrentContext.on "layer:create", (newLayer) ->
____newLayer.enableHighlight = false
However, this only works with imported layers or layers created in code, how can i make it work with layers created in the design tab?