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

Method fixCropperLeft

js/selecter.js:522–535  ·  view source on GitHub ↗
(left)

Source from the content-addressed store, hash-verified

520
521 /* fixers */
522 fixCropperLeft(left) {
523 let newLeft = left;
524 const absLeftMiddle = this.rectLeft() + this.area.rect.clientWidth;
525 if (newLeft < this.main.elLeft()) {
526 return this.main.elLeft();
527 } else if (newLeft > absLeftMiddle) {
528 newLeft = absLeftMiddle;
529 if (this.area.resizingL) {
530 this.area.resizingL = false;
531 this.area.resizingR = true;
532 }
533 }
534 return newLeft;
535 }
536
537 fixCropperRight(right) {
538 let newRight = right;

Callers 2

handleMouseMoveMethod · 0.95
leftKeepRatioMethod · 0.95

Calls 2

rectLeftMethod · 0.95
elLeftMethod · 0.80

Tested by

no test coverage detected