MCPcopy Create free account
hub / github.com/openscopeproject/InteractiveHtmlBom / resizeCanvas

Function resizeCanvas

InteractiveHtmlBom/web/render.js:668–677  ·  view source on GitHub ↗
(layerdict)

Source from the content-addressed store, hash-verified

666}
667
668function resizeCanvas(layerdict) {
669 var canvasdivid = {
670 "F": "frontcanvas",
671 "B": "backcanvas"
672 } [layerdict.layer];
673 var width = document.getElementById(canvasdivid).clientWidth * devicePixelRatio;
674 var height = document.getElementById(canvasdivid).clientHeight * devicePixelRatio;
675 recalcLayerScale(layerdict, width, height);
676 redrawCanvas(layerdict);
677}
678
679function resizeAll() {
680 resizeCanvas(allcanvas.front);

Callers 1

resizeAllFunction · 0.85

Calls 2

recalcLayerScaleFunction · 0.85
redrawCanvasFunction · 0.85

Tested by

no test coverage detected