Hello guys,I have a question regarding Classes. How can I succeed to add a property to the object Key without having to add it after creating a new layer? (see the picture below for a more explicit version)
Looks like there is a lot of property sanitization going in in the Layer constructor. I tried, but wasn't able to find an elegant way around it: https://github.com/koenbok/Framer/blob/master/framer/Layer.coffee
Adding stuff after calling super() is probably a major JS faux pas, but this did the trick for me:
I'll use this for now but maybe Koen Bok or anyone at Framer can suggest a more elegant way?
Ah, good one Florian Pnn. I made you a little example of how I would probably approach this. It allows you to assign any value you pass in the options to the class (aka this/@).
Example → http://share.framerjs.com/2otrn00htx9i/
Just posted this in the Framer NYC group, good example of using classes that extend Layer and Framer.BaseClass: http://share.framerjs.com/zwdmmanpd9sk/