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

Method syncToolElement

js/main.js:1410–1423  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1408 }
1409
1410 syncToolElement() {
1411 const w = Math.round(this.canvas.documentClientWidth);
1412 const l = this.canvas.offsetLeft;
1413 const h = Math.round(this.canvas.documentClientHeight);
1414 const t = this.canvas.offsetTop;
1415 this.toolContainer.style.left = `${l}px`;
1416 this.toolContainer.style.width = `${w}px`;
1417 this.toolContainer.style.top = `${t}px`;
1418 this.toolContainer.style.height = `${h}px`;
1419 this.substrate.style.left = `${l}px`;
1420 this.substrate.style.width = `${w}px`;
1421 this.substrate.style.top = `${t}px`;
1422 this.substrate.style.height = `${h}px`;
1423 }
1424
1425 clear() {
1426 const w = this.params.defaultSize.width === 'fill' ? this.wrapper.clientWidth : this.params.defaultSize.width;

Callers 3

initEventHandlersMethod · 0.95
adjustSizeFullMethod · 0.95
clearMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected