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

Method leftKeepRatio

js/selecter.js:436–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434 }
435
436 leftKeepRatio() {
437 const newW = this.area.rect.clientHeight * this.placedRatio;
438 const suggLeft = this.main.elLeft() +
439 (this.area.el.clientWidth - this.right - newW - 2);
440 const absLeft = this.fixCropperLeft(suggLeft);
441 this.setLeft(absLeft - this.main.elLeft());
442 }
443
444 topKeepRatio() {
445 const newH = this.area.rect.clientWidth / this.placedRatio;

Callers 1

handleMouseMoveMethod · 0.95

Calls 3

fixCropperLeftMethod · 0.95
setLeftMethod · 0.95
elLeftMethod · 0.80

Tested by

no test coverage detected