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

Method resize

js/main.js:1399–1408  ·  view source on GitHub ↗
(x, y)

Source from the content-addressed store, hash-verified

1397}
1398
1399 resize(x, y) {
1400 this.info.innerHTML = `${x}<span>x</span>${y}<br>${(this.originalMime || 'png').replace('image/', '')}`;
1401 this.size = {
1402 w: x,
1403 h: y,
1404 ratio: x / y,
1405 };
1406 this.canvas.setAttribute('width', this.size.w);
1407 this.canvas.setAttribute('height', this.size.h);
1408 }
1409
1410 syncToolElement() {
1411 const w = Math.round(this.canvas.documentClientWidth);

Callers 7

constructorMethod · 0.95
fitImageMethod · 0.95
clearMethod · 0.95
applyStateMethod · 0.80
doCropMethod · 0.80
constructorMethod · 0.80
constructorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected