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

Method fixCropperTop

js/selecter.js:553–566  ·  view source on GitHub ↗
(top)

Source from the content-addressed store, hash-verified

551 }
552
553 fixCropperTop(top) {
554 let newTop = top;
555 const absTopMiddle = this.rectTop() + this.area.rect.clientHeight;
556 if (newTop < this.main.elTop()) {
557 return this.main.elTop();
558 } else if (newTop > absTopMiddle) {
559 newTop = absTopMiddle;
560 if (this.area.resizingT) {
561 this.area.resizingT = false;
562 this.area.resizingB = true;
563 }
564 }
565 return newTop;
566 }
567
568 fixCropperBottom(bottom) {
569 let newBottom = bottom;

Callers 2

handleMouseMoveMethod · 0.95
topKeepRatioMethod · 0.95

Calls 2

rectTopMethod · 0.95
elTopMethod · 0.80

Tested by

no test coverage detected