(state, addCallback)
| 102 | } |
| 103 | |
| 104 | open(state, addCallback) { |
| 105 | this.target = state.target; |
| 106 | this.palleteColor = state.palleteColor; |
| 107 | this.alpha = state.alpha; |
| 108 | this.lightPosition = this.lightPosition || this.w - 1; |
| 109 | |
| 110 | this.drawLighter(); |
| 111 | this.colorRegulator.style.left = `${this.lightPosition}px`; |
| 112 | this.alphaRegulator.style.left = `${Math.round(this.alpha * this.w)}px`; |
| 113 | this.regetColor(); |
| 114 | |
| 115 | this.wrapper.removeAttribute('hidden'); |
| 116 | this.opened = true; |
| 117 | this.addCallback = addCallback; |
| 118 | } |
| 119 | |
| 120 | close() { |
| 121 | this.wrapper.setAttribute('hidden', 'true'); |
nothing calls this directly
no test coverage detected