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

Method reCalcCropperCords

js/selecter.js:142–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

140 }
141
142 reCalcCropperCords() {
143 const ratio = this.getScale();
144 this.area.topl = [
145 Math.round(((this.rectLeft() - this.main.elLeft())) / ratio),
146 Math.round(((this.rectTop() - this.main.elTop())) / ratio)];
147
148 this.area.bottoml = [
149 Math.round(this.area.topl[0] + ((this.area.rect.clientWidth + 2) / ratio)),
150 Math.round(this.area.topl[1] + ((this.area.rect.clientHeight + 2) / ratio))];
151 }
152
153 adjustPosition() {
154 if (!this.shown) {

Callers 4

selectAllMethod · 0.95
placeAtMethod · 0.95
handleMouseDownMethod · 0.95
handleMouseMoveMethod · 0.95

Calls 5

getScaleMethod · 0.95
rectLeftMethod · 0.95
rectTopMethod · 0.95
elLeftMethod · 0.80
elTopMethod · 0.80

Tested by

no test coverage detected