diff --git a/CHANGELOG.md b/CHANGELOG.md index 0daec1f5..452167fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ # Changelog +## 1.15.5 + +- editor + - inspector: add solo mode with `alt+click` for category panels + ## 1.15.4 - bug fixes - - matrix: avanced property issue in`props` property + - matrix: avanced property issue in`props` property ## 1.15.3 diff --git a/src/client/ui/ui-inspector.js b/src/client/ui/ui-inspector.js index 94ea8ef2..8e2eb772 100644 --- a/src/client/ui/ui-inspector.js +++ b/src/client/ui/ui-inspector.js @@ -25,8 +25,19 @@ class UiInspector extends UiWidget { this.container.addEventListener('fast-click', (e)=>{ if (e.target.classList.contains('category-header')) { - var name = e.target.getAttribute('data-name'), - expandedIndex = this.expandedCategories.indexOf(name) + var name = e.target.getAttribute('data-name') + + if (e.detail.altKey) { + DOM.each(this.container, 'osc-inspector-category.expanded', (item)=>{ + let iname = item.firstChild.getAttribute('data-name'), + index = this.expandedCategories.indexOf(iname) + if (iname !== name) { + if (index > -1) this.expandedCategories.splice(index, 1) + item.classList.remove('expanded') + } + }) + } + var expandedIndex = this.expandedCategories.indexOf(name) e.target.parentNode.classList.toggle('expanded', expandedIndex < 0) if (expandedIndex > -1) { this.expandedCategories.splice(expandedIndex, 1)