Velara
July 11, 2019, 8:54pm
6
There are no document events. There is an update()
method that’s called when selection changes in your plugin panel. This contains all updates to a document like move, resize and selection change.
I’m running some possibly processor intensive events on update() and I want to run those events only if there is a change to the artboard. Right now, if I simply change the selection the update method is called.
Use Case
If the user moved an rectangle then I want to know that the document has changed. If the user simply selected a different rectangle then the document has not changed and I want to avoid running any specific operations.
async update(type) {
if (type=="selection") updateUI()…
I want some events triggered by XD when document changes.
Like imageChanges, documentChanges, documentSaved, contentEditing, etc.
I don’t find them in the Plugin documents…