sketch-hq / SketchAPI

The JavaScript plugin library embedded in Sketch
https://developer.sketch.com/reference/api
MIT License
842 stars 126 forks source link

Get and set layout #119

Open kupe517 opened 6 years ago

kupe517 commented 6 years ago

Does the API provide a way to get the layout settings of the current artboard and also set them?

mathieudutour commented 6 years ago

what do you mean by layout?

kupe517 commented 6 years ago

The user settings in View > Canvas > Layout Lettings. The context API exposes all of those settings via artboard.layout(), totalWidth(), numberOfColumns(), etc.

Would love for this to be built into the JS api to be able to read those properties and set them as well.