trying to edit the children of a booleanGroup throws an error.
needed:
a booleanGroup which contains at least one rectangle
example code:
(can be copied into the increaseRectangle example https://adobexdplatform.com/plugin-docs/tutorials/quick-start-panel/)
let i = selection.items[0];
if(i.constructor.name == "BooleanGroup"){
console.log(i);
i.children.forEach(function(c){
console.log(c);
if(c.constructor.name == "Rectangle"){
let radii = c.cornerRadii;
console.log(radii);
radii.topLeft = 10;
c.cornerRadii = radii; //this throws an error
}
});
}
developer console output:
Plugin Error: Plugin made a change outside the current edit context
at convertPluginErrorToString (plugins/PluginErrorUtil.js:1:198)
at internalFormatPluginError (plugins/PluginErrorUtil.js:1:1073)
at internalReportPluginError (plugins/PluginErrorUtil.js:1:1180)
at Object.reportPluginError (plugins/PluginErrorUtil.js:1:1612)
at r (plugins/ScenegraphGuard.js:1:550)
at Object.checkChange (plugins/ScenegraphGuard.js:1:1067)
at Object.EventEmitter._emitEvent (third_party/events.js:1:1178)
at Object.EventEmitter.emit (third_party/events.js:1:1668)
at Rectangle.Group.notifyChanged (lib/scenegraph/GroupExtension.js:1:842)
at Rectangle.<anonymous> (plugins/ScenegraphWrappers.js:1:17976)
at Rectangle.<anonymous> (plugins/ScenegraphWrappers.js:1:2622)
at C:\Users\tp\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\develop\17b0abca\main.js:194:37
at plugins/WrapperList.js:1:378
at LinkedList.forEach (lib/LinkedList.js:1:1534)
at ReadOnlyList.forEach (lib/ReadOnlyList.js:1:282)
at WrapperList.forEach (plugins/WrapperList.js:1:354)
at C:\Users\tp\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\develop\17b0abca\main.js:188:24
at Object.execScenegraphEdit (plugins/ScenegraphGuard.js:1:4431)
at plugins/ApplicationWrapper.js:1:4185
at b.increaseRectangleSize (C:\Users\tp\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\develop\17b0abca\main.js:176:5)
at uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:893
at j (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:785)
at g (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:390)
at f (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:192)
at k (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:1097)
at Object.l [as dispatchNativeEvent] (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:1468)
at b.value (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:222:1270)
at i (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:533)
at f (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:249)
at k (uxp://uxp-internal/home/ubuntu/jenkins/workspace/Torq/torq-native/release-3.1.0/build/modules_gen/domjs/src/js/domjs_scripts.js:322:1097)
expected behaviour
change of the child item
behaviour
error and reverting/undo of the changes
suggestion
it would be really useful if this was allowed.
as children of groups can be edited, this seems inconsistent.