Hide panels when nothing is selected (#823)

master
pmkrawczyk 2022-07-24 20:36:01 +02:00 committed by GitHub
parent b16c96e3f6
commit 6eb5224213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

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') {