diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fa29aca..09b1956d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,9 @@ - button: add `soft` mode for the `wrap` property - switch: add `wrap` property +- editor + - display dropdown and checkbox for boolean properties with extra choices + ## 1.9.5 - bug fixes diff --git a/src/client/ui/ui-inspector-field.js b/src/client/ui/ui-inspector-field.js index 6eee0d97..b3f71970 100644 --- a/src/client/ui/ui-inspector-field.js +++ b/src/client/ui/ui-inspector-field.js @@ -88,7 +88,9 @@ class UiInspectorField extends UiWidget { this.container.appendChild(wrapper) - } else if (this.default.type.includes('boolean')) { + } + + if (this.default.type.includes('boolean')) { let toggle = html` @@ -98,7 +100,9 @@ class UiInspectorField extends UiWidget { this.container.appendChild(toggle) - } else if (this.name.includes('color')) { + } + + if (this.name.includes('color')) { let style = window.getComputedStyle(this.widget.container), colorData = this.widget.constructor.cssVariables.find(x=>x.js === this.name),