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

View file

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

View file

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