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

Method fixCropperRight

js/selecter.js:537–551  ·  view source on GitHub ↗
(right)

Source from the content-addressed store, hash-verified

535 }
536
537 fixCropperRight(right) {
538 let newRight = right;
539 const absRightLimit = this.main.elLeft() + this.area.el.clientWidth;
540 if (newRight > absRightLimit) {
541 return absRightLimit;
542 } else if (newRight < this.rectLeft()) {
543 newRight = this.rectLeft() +
544 this.area.rect.clientWidth;
545 if (this.area.resizingR) {
546 this.area.resizingR = false;
547 this.area.resizingL = true;
548 }
549 }
550 return newRight;
551 }
552
553 fixCropperTop(top) {
554 let newTop = top;

Callers 2

handleMouseMoveMethod · 0.95
rightKeepRatioMethod · 0.95

Calls 2

rectLeftMethod · 0.95
elLeftMethod · 0.80

Tested by

no test coverage detected