I need to remove a rectangle from an Artboard when the Artboard stops being selected.
Is there anyway to edit the document without the user triggering some UI event directly on the panel?
- If an Artboard is selected the user can specify
- Create a rectangle and display within Artboard at specified size and origin.
- If the Artboard stops being selected (or plugin panel is closed) remove the rectangle.
I’m detecting that the Artboard has lost focus (not selected anymore) via the
update function attached to my panel. But when I try to
removeFromParent I get the error;
- Plugin Error: Panel plugin edits must be initiated from a supported UI event.
- This is a panel plugin.
- I am using
- I’m successfully creating and adding the rectangle to the Artboard.
- When the user specifies a size/origin value from the panel.