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

Method open

js/colorPicker.js:104–118  ·  view source on GitHub ↗
(state, addCallback)

Source from the content-addressed store, hash-verified

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');

Callers

nothing calls this directly

Calls 2

drawLighterMethod · 0.95
regetColorMethod · 0.95

Tested by

no test coverage detected