From fb3bc33ca0b6bf1c249438edd17c6380e4568711 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Wed, 2 Feb 2022 12:09:59 -0500 Subject: [PATCH] fix invalid z height, defunct widget annotation cleanup, invalid widget highlighting --- src/kiri/main.js | 6 +++--- src/moto/broker.js | 4 ++++ src/moto/space.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/kiri/main.js b/src/kiri/main.js index 5214a7ba..acefd30a 100644 --- a/src/kiri/main.js +++ b/src/kiri/main.js @@ -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); diff --git a/src/moto/broker.js b/src/moto/broker.js index cdcc3a67..f7bbdd23 100644 --- a/src/moto/broker.js +++ b/src/moto/broker.js @@ -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) { diff --git a/src/moto/space.js b/src/moto/space.js index c92d76f5..40d32fdb 100644 --- a/src/moto/space.js +++ b/src/moto/space.js @@ -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) {