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

Method fixCropperBottom

js/selecter.js:568–581  ·  view source on GitHub ↗
(bottom)

Source from the content-addressed store, hash-verified

566 }
567
568 fixCropperBottom(bottom) {
569 let newBottom = bottom;
570 const absBottomLimit = this.main.elTop() + this.area.el.clientHeight;
571 if (newBottom > absBottomLimit) {
572 return absBottomLimit;
573 } else if (newBottom < this.rectTop()) {
574 newBottom = this.rectTop() + this.area.rect.clientHeight;
575 if (this.area.resizingB) {
576 this.area.resizingB = false;
577 this.area.resizingT = true;
578 }
579 }
580 return newBottom;
581 }
582}

Callers 2

handleMouseMoveMethod · 0.95
bottomKeepRatioMethod · 0.95

Calls 2

rectTopMethod · 0.95
elTopMethod · 0.80

Tested by

no test coverage detected