fixes #197 invalidate tabs on scale and traces on scale or rotate

This commit is contained in:
Stewart Allen 2022-10-09 18:03:45 -04:00
commit 6d20801efe

View file

@ -146,6 +146,25 @@ CAM.init = function(kiri, api) {
"selection.rotate" "selection.rotate"
], updateStock); ], updateStock);
// invalidate trace ops on scale or rotate
api.event.on([
"selection.scale",
"selection.rotate"
], () => {
for (let op of current.process.ops) {
if (op.type === 'trace') {
op.areas = {};
}
}
});
// invalidate tabs when scaleds
api.event.on([
"selection.scale",
], () => {
func.tabClear();
});
api.event.on([ api.event.on([
// update tab color/opacity on dark/light change // update tab color/opacity on dark/light change
"boolean.update" "boolean.update"