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

Method draw

js/selecter.js:501–511  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

499 }
500
501 draw() {
502 if (this.area.topl) {
503 const ratio = this.canvas.clientWidth / this.canvas.getAttribute('width');
504 this.setLeft(this.area.topl[0] * ratio);
505 this.setTop(this.area.topl[1] * ratio);
506 this.setRight(this.area.el.clientWidth - (
507 (this.area.bottoml[0] - this.area.topl[0]) * ratio));
508 this.setBottom(this.area.el.clientHeight - (
509 (this.area.bottoml[1] - this.area.topl[1]) * ratio));
510 }
511 }
512
513 rectLeft() {
514 return this.area.rect.documentOffsetLeft + this.main.scroller.scrollLeft;

Callers 2

constructorMethod · 0.80
adjustSizeFullMethod · 0.80

Calls 4

setLeftMethod · 0.95
setTopMethod · 0.95
setRightMethod · 0.95
setBottomMethod · 0.95

Tested by

no test coverage detected