MCPcopy
hub / github.com/anvaka/VivaGraphJS / updateSize

Function updateSize

src/View/webglGraphics.js:84–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 },
83
84 updateSize = function () {
85 if (container && graphicsRoot) {
86 width = graphicsRoot.width = Math.max(container.offsetWidth, 1);
87 height = graphicsRoot.height = Math.max(container.offsetHeight, 1);
88 if (gl) { gl.viewport(0, 0, width, height); }
89 if (linkProgram) { linkProgram.updateSize(width / 2, height / 2); }
90 if (nodeProgram) { nodeProgram.updateSize(width / 2, height / 2); }
91 }
92 },
93
94 fireRescaled = function (graphics) {
95 graphics.fire("rescaled");

Callers 1

webglGraphicsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected