Hide panels when nothing is selected (#823)

This commit is contained in:
pmkrawczyk
2022-07-24 20:36:01 +02:00
committed by GitHub
parent b16c96e3f6
commit 6eb5224213

View File

@@ -417,8 +417,13 @@ export default {
selectedChanged (opts) {
// Use this to update the current selected elements
selElems = opts.elems
let i = selElems.length
// Hide panels if nothing is selected
if (!i) {
showPanel(false, 'star')
showPanel(false, 'polygon')
return
}
while (i--) {
const elem = selElems[i]
if (elem?.getAttribute('shape') === 'star') {