changeset 2332:2aeceb6f03aa

edit-choice defaults to no 'rename' button
author drewp@bigasterisk.com
date Fri, 02 Jun 2023 09:42:48 -0700
parents b09ff4b0094c
children 447f25b2712d
files light9/live/Light9DeviceSettings.ts light9/web/EditChoice.ts
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/light9/live/Light9DeviceSettings.ts	Fri Jun 02 09:42:18 2023 -0700
+++ b/light9/live/Light9DeviceSettings.ts	Fri Jun 02 09:42:48 2023 -0700
@@ -49,7 +49,7 @@
       <div id="save">
         <div>
           <button @click=${this.newEffect}>New effect</button>
-          <edit-choice .uri=${this.currentEffect ? this.currentEffect.uri : null} @edited=${this.onEffectChoice2}></edit-choice>
+          <edit-choice .uri=${this.currentEffect ? this.currentEffect.uri : null} @edited=${this.onEffectChoice2} rename></edit-choice>
           <button @click=${this.clearAll}>clear settings in this effect</button>
         </div>
       </div>
--- a/light9/web/EditChoice.ts	Fri Jun 02 09:42:18 2023 -0700
+++ b/light9/web/EditChoice.ts	Fri Jun 02 09:42:48 2023 -0700
@@ -63,12 +63,13 @@
 export class EditChoice extends LitElement {
   @property() uri?: NamedNode
   @property({ type: Boolean }) nounlink = false;
+  @property({ type: Boolean }) rename = false;
   static styles = [
     css`
       :host {
         display: inline-block;
         background: #141448;
-        min-width: 10em;
+        /* min-width: 10em; */
         padding: 3px 8px;
       }
       .dragging {
@@ -88,7 +89,7 @@
     <button @click=${this.unlink}>Unlink</button>
     `
     return html`
-      <resource-display .uri=${this.uri} rename></resource-display>
+      <resource-display .uri=${this.uri} ?rename=${this.rename}></resource-display>
       ${this.nounlink ? html`` : unlink}
     `;
   }