[sketchplugins-dev] Resizing an artboard to fit

Aby Nimbalkar aby at scooterinteractive.com
Thu Sep 22 21:33:05 EDT 2016


This works, but only for the current artboard:

context.document.actionsController().actionWithID("
MSResizeArtboardToFitAction").resizeArtboardToFit(nil)



On Thu, Sep 22, 2016 at 8:52 PM, Sherin Cleetus <sherin.jc at gmail.com> wrote:

> Hi,
>
> I am developing on version: 40 (33762).
>
> The `resizeToFitChildrenWithOption:option` method does not work for
> resizing an artboard to fit.
>
> var artboard = context.document.artboards()[0];
>
> artboard.resizeToFitChildrenWithOption(1);
>
> Since MSArtboardGroup inherits from MSLayerGroup I thought this method
> would work for artboards. Should I be using  a different API ?
>
> Thanks.
>
> --
> Sherin C
>
>
>
> _______________________________________________
> dev mailing list
> dev at sketchplugins.com
> http://sketchplugins.com/mailman/listinfo/dev_sketchplugins.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sketchplugins.com/pipermail/dev_sketchplugins.com/attachments/20160923/af50648c/attachment.html>


More information about the dev mailing list