editor: display "shared properties" in inspector when multiple widgets are selected

This commit is contained in:
bordun 2020-10-04 19:28:12 +02:00
parent 0dcab0c634
commit 5aff6926a8

View file

@ -121,6 +121,8 @@ class UiInspector extends UiWidget {
let category = html`<osc-inspector-category class="${this.expandedCategories.indexOf(categoryName) > -1 ? 'expanded' : ''}"></osc-inspector-category>`,
categoryLabel = categoryName === 'class_specific' ? widget.props.type : categoryName
if (widgets.length > 1 && categoryName === 'class_specific') categoryLabel = 'shared properties'
category.appendChild(html`
<div class="category-header" data-name="${categoryName}">${categoryLabel}${categoryName === 'widget' && widgets.length > 1 ? `s (${widgets.length})` : ''}</div>
`)