Changeset - c97c0ac03597
[Not reviewed]
default
0 1 0
Drew Perttula - 7 years ago 2018-06-07 23:04:26
drewp@bigasterisk.com
ok to edit a color by value only
Ignore-this: fcda3510bf9c8bd49c3fb1cf92d5b3c4
1 file changed with 3 insertions and 0 deletions:
0 comments (0 inline, 0 general)
light9/web/light9-color-picker.html
Show inline comments
 
@@ -244,24 +244,27 @@
 
         this._updateSmallCrosshair();
 
       }.bind(this));
 
       this.$.large.onCanvasMove = this.onCanvasMove.bind(this);
 
       this.$.large.hideLarge = this.hideLarge.bind(this);
 
       document.body.append(this.$.large);
 
       this.$.large.style.display = 'none';
 
     }
 
     disconnectedCallback() {
 
       super.disconnectedCallback();
 
       document.body.removeChild(this.$.large);
 
     }
 
     onValue(value) {
 
       if (this.hueSatColor === null) {
 
         this.hueSatColor = '#ffffff';
 
       }
 
       let neverBlack = .1 + .9 * value / 255;
 
       this.$.smallRainbow.style.filter = `brightness(${neverBlack})`;
 
     }
 
     writeColor(hueSatColor, value) {
 
       if (hueSatColor === null || this.pauseWrites) { return; }
 
       this.color = one.color(hueSatColor).value(value / 255).hex();
 
     }
 
     readColor(color) {
 
       if (this.$.large.style.display == 'block') {
 
         // for performance, don't do color searches on covered widget
 
         return;
 
       }
0 comments (0 inline, 0 general)