Changeset - 18d6bdd422f2
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 20 months ago 2023-05-29 18:48:00
drewp@bigasterisk.com
update after boost
1 file changed with 8 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/light9-color-picker.ts
Show inline comments
 
@@ -63,9 +63,7 @@ export class Light9ColorPicker extends L
 
      this.setColor(this.color);
 
    }
 
    if (changedProperties.has("value") || changedProperties.has("hueSatColor")) {
 
      this.color = color(this.hueSatColor)
 
        .value(this.value / 255)
 
        .hex();
 
      this.updateColorFromHSV();
 

	
 
      this.dispatchEvent(new CustomEvent("input", { detail: { value: this.color } }));
 

	
 
@@ -75,6 +73,12 @@ export class Light9ColorPicker extends L
 
    }
 
  }
 

	
 
  private updateColorFromHSV() {
 
    this.color = color(this.hueSatColor)
 
      .value(this.value / 255)
 
      .hex();
 
  }
 

	
 
  private onVSliderChange(ev: CustomEvent) {
 
    this.value = ev.detail.value;
 
  }
 
@@ -93,6 +97,7 @@ export class Light9ColorPicker extends L
 
    if (this.value < (20 as int8)) {
 
      log("boost");
 
      this.value = 255 as int8;
 
      this.updateColorFromHSV();
 
    }
 
    pickerFloat.startPick(new ClientCoord(ev.clientX, ev.clientY), this.color, (hsc: string) => {
 
      this.hueSatColor = hsc;
0 comments (0 inline, 0 general)