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

Method getColorLightAtClick

js/colorPicker.js:150–157  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

148 }
149
150 getColorLightAtClick(e) {
151 let x = e.clientX - this.canvasLight.documentOffsetLeft;
152 x = (x < 1 && 1) || x;
153 x = (x > this.w - 1 && this.w - 1) || x;
154 this.lightPosition = x;
155 this.colorRegulator.style.left = `${x}px`;
156 this.regetColor();
157 }
158
159 getAlphaAtClick(e) {
160 let x = e.clientX - this.canvasAlpha.documentOffsetLeft;

Callers 2

handleMouseDownMethod · 0.95
handleMouseMoveMethod · 0.95

Calls 1

regetColorMethod · 0.95

Tested by

no test coverage detected