fix bug with supports not following a part mirror and mirror not triggering a workspace save

This commit is contained in:
Stewart Allen 2021-03-25 14:19:17 -04:00
commit 995e23bbca
3 changed files with 23 additions and 5 deletions

View file

@ -294,6 +294,17 @@
func.sclear();
}
});
api.event.on("widget.mirror", widget => {
if (!isFdmMode) {
return;
}
let ann = API.widgets.annotate(widget.id);
let sups = ann.support || [];
sups.forEach(sup => {
let wsup = widget.sups[sup.id];
wsup.box.position.x = wsup.x = sup.x = -sup.x;
});
});
api.event.on("widget.rotate", rot => {
if (!isFdmMode) {
return;