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

Method adjustPosition

js/selecter.js:153–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151 }
152
153 adjustPosition() {
154 if (!this.shown) {
155 return;
156 }
157 const ratio = this.getScale();
158 this.setLeft(this.area.topl[0] * ratio);
159 this.setTop(this.area.topl[1] * ratio);
160 this.setRight(0);
161 this.setRight(this.canvas.clientWidth - (this.area.bottoml[0] * ratio));
162 this.setBottom(this.canvas.clientHeight - (this.area.bottoml[1] * ratio));
163 }
164
165 placeAt(l, t, r, b, img) {
166

Callers 2

zoomImageMethod · 0.80
setZoomMethod · 0.80

Calls 5

getScaleMethod · 0.95
setLeftMethod · 0.95
setTopMethod · 0.95
setRightMethod · 0.95
setBottomMethod · 0.95

Tested by

no test coverage detected