I’m building a plugin and I know that I can specify the height of my plugin panel like this:
penpot.ui.open(‘Window name’, ‘url’, {width: 150, height: 150});
However, I would like to resize the window after it’s already open.
I’ve tried running that command again, but it opens a new window.
Is there anything in the API for that?
Thanks!
Dale.
1 Like
Hi!
Currently, there isn’t a way to dynamically resize a plugin window after it’s already open. Running penpot.ui.open()
again will always create a new window.
This isn’t something we had in mind when designing the API, but we’ll take this into consideration for future updates. Thank you!
2 Likes
Thanks for the reply
As a side note, when I run the code above from an already open window, it opens a new window, but it also duplicates the already opened window. Neither of the new windows can then be closed.
While opening a new window would be a nice feature too, I’m guessing correct behaviour for the moment would be to not allow a plugin to open two windows?
EIther way, just letting you know.
1 Like
Thanks for pointing this out!
You’re right, the correct behavior should be to open only one window. Having two windows open at the same time is not how it’s meant to work.
1 Like