This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Sandor Rozsa
Posted Oct 09 - Read on Facebook

desperately needed – help from a framer veteran:

8 Comments

Jonas Treub

What data would give to the loadDocs function?

Sandor Rozsa

Jonas Treub The developer passes mit a little script with a structure – I have updated my question at SatckOverflow with the information (sorry I missed that). But anyhow: in an ideal world, the script should read a local JSON file imported by the framer importaer... Thanks Jonas!

Jonas Treub

Here I made a start converting it to modern Framer API https://framer.cloud/dWfcG

Sandor Rozsa

Jonas Treub Jonas, this is simply awesome! Thank you! May i ask you some additional things please? You are loading the structure from the same coffescript inside framet now. Would something like: data = JSON.parse Utils.domLoadDataSync „myTestfile.json“
loadDocs(data); also work? And more important: could this created/imported layers be exposed to the design-view (so that amateur coders like me) can take advantage of this import/creation process?

Anyhow: thank you very much! If you have a book-wishlist, please, please drop me a PM :-)

Jonas Treub

I think that should work for JSON. Currently you can only import layers into Code. Thanks for the offer but I already got more books then I can read ;)

Sandor Rozsa

Jonas Treub thanks again Jonas. I am getting an error when I define a layer with "draggable" in the name. This is supposed to create a draggable layer I think. The error claims that "ui" is not defined. Is this something related to the old API problems? Or simply something undefined in the project? Regarding the books: Well we could of course convert the book in a bottle of whatsoever... You see, I want to shamelessly bribe you :-) ;-)

Jonas Treub

Change
view.draggable = new ui.Draggable(view)
To
view.draggable.enabled = true

Sandor Rozsa

WOW!!!

Read the entire post on Facebook