Is there a way to center on selection?

After selecting an item is there a way to center the view to it? Something like this:

selection.items = sceneNode;
selection.centerOnSelection();
1 Like

From the docs on github, it looks like that will be supported in the next version (see the xd-14-apis branch: https://github.com/AdobeXD/plugin-docs/blob/xd-14-apis/reference/viewport.md). I don’t think that there’s a way to do that in the current version, though…

1 Like

I had written code for it so post it in day or two