Changeset - 078e6e7ec206
[Not reviewed]
default
0 2 0
drewp@bigasterisk.com - 20 months ago 2023-06-03 23:02:34
drewp@bigasterisk.com
shorter sliders send fewer events
2 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
light9/fade/Light9EffectFader.ts
Show inline comments
 
@@ -83,7 +83,7 @@ export class Light9EffectFader extends L
 
        background: #272727;
 
      }
 
      light9-fader {
 
        margin: 4px;
 
        margin: 0px;
 
        width: 100%;
 
      }
 
    `,
light9/fade/Light9Fader.ts
Show inline comments
 
@@ -17,7 +17,7 @@ export class Light9Fader extends LitElem
 
        display: inline-block;
 
        border: 2px gray inset;
 
        background: #000;
 
        height: 130px;
 
        height: 80px;
 
      }
 
      #handle {
 
        background: gray;
 
@@ -33,8 +33,8 @@ export class Light9Fader extends LitElem
 

	
 
  @query("#handle") handleEl!: HTMLElement;
 

	
 
  troughHeight = 130 - 2 - 2 - 5 - 5;
 
  handleHeight = 20;
 
  troughHeight = 80 - 2 - 2 - 5 - 5;
 
  handleHeight = 10;
 

	
 
  drag?: Drag;
 
  unmutedValue: number = 1;
 
@@ -94,7 +94,7 @@ export class Light9Fader extends LitElem
 

	
 
    this.addEventListener("wheel", (ev: WheelEvent) => {
 
      ev.preventDefault();
 
      this.value += ev.deltaY / 120 * -.05;
 
      this.value += ev.deltaY / this.troughHeight * -.05;
 
      this.valueChangedFromUi()
 
    });
 

	
0 comments (0 inline, 0 general)