fix invalid z height, defunct widget annotation cleanup, invalid widget highlighting

This commit is contained in:
Stewart Allen 2022-02-02 12:09:59 -05:00
commit fb3bc33ca0
3 changed files with 8 additions and 4 deletions

View file

@ -1886,7 +1886,7 @@
width = parseInt(dev.bedWidth),
depth = parseInt(dev.bedDepth),
height = parseFloat(dev.bedHeight),
parseFloat(dev.maxHeight)
parseFloat(dev.maxHeight || 100)
);
let proc = settings.process,
ctrl = settings.controller,
@ -2027,7 +2027,7 @@
} else {
forSelectedWidgets(w => {
w.setColor(color.selected);
});
}, true);
}
}
@ -2980,11 +2980,11 @@
if (wid && anno) {
wid.anno = anno;
console.log('transfer settings annotations to widget', id);
delete newset.widget[id];
wid.saveState();
} else {
console.log('missing widget for annotations', id);
}
delete newset.widget[id];
}
}
settings = CONF.normalize(newset);

View file

@ -44,6 +44,10 @@ gapp.broker = new class Broker {
}
return;
}
if (typeof topic !== 'string') {
console.trace({invalid_topic: topic});
return;
}
let topics = this.topics;
let channel = topics[topic];
if (!channel) {

View file

@ -288,7 +288,7 @@
width = psize.width || 300,
depth = psize.depth || 300,
height = psize.height || 2.5,
maxz = psize.maxz
maxz = psize.maxz || 100
) {
psize = { width, depth, height, maxz };
if (isRound) {