MCPcopy Create free account
hub / github.com/devforth/painterro / handleMouseDown

Method handleMouseDown

js/colorPicker.js:179–199  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

177 }
178
179 handleMouseDown(e) {
180 if (this.choosing && e.button !== 2) { // 0 - m1, 1 middle, 2-m2
181 this.choosingActive = true;
182 this.handleMouseMove(e);
183 return true;
184 }
185 this.choosing = false;
186 if (e.target === this.canvas) {
187 this.selecting = true;
188 this.getPaletteColorAtPoint(e);
189 }
190 if (e.target === this.canvasLight || e.target === this.colorRegulator) {
191 this.lightSelecting = true;
192 this.getColorLightAtClick(e);
193 }
194 if (e.target === this.canvasAlpha || e.target === this.alphaRegulator) {
195 this.alphaSelecting = true;
196 this.getAlphaAtClick(e);
197 }
198 return false;
199 }
200
201 handleMouseMove(e) {
202 if (this.opened) {

Callers

nothing calls this directly

Calls 4

handleMouseMoveMethod · 0.95
getColorLightAtClickMethod · 0.95
getAlphaAtClickMethod · 0.95

Tested by

no test coverage detected