getflourish / Sketch-Style-Inventory

Review, import & export styles in Sketch.
MIT License
1.83k stars 104 forks source link

Implement view centering and zooming in 3.3 #44

Closed getflourish closed 9 years ago

getflourish commented 9 years ago

Due to API changes, the plugin is unable to correctly focus the view on artboards / layers.

frankko commented 9 years ago

Not sure if this helps, but since 3.3 I’ve been doing something like so:

var doc = context.document; var view = [doc currentView];

then select either an artboard or a layer, as you would, then

[view zoomToSelection];

getflourish commented 9 years ago

Thanks! :)