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

Method topKeepRatio

js/selecter.js:444–449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

442 }
443
444 topKeepRatio() {
445 const newH = this.area.rect.clientWidth / this.placedRatio;
446 const absTop = this.fixCropperTop(
447 this.main.elTop() + (this.area.el.clientHeight - this.bottom - newH - 2));
448 this.setTop(absTop - this.main.elTop());
449 }
450
451 bottomKeepRatio() {
452 const newH = this.area.rect.clientWidth / this.placedRatio;

Callers 1

handleMouseMoveMethod · 0.95

Calls 3

fixCropperTopMethod · 0.95
setTopMethod · 0.95
elTopMethod · 0.80

Tested by

no test coverage detected