Comparing version 3.0.1 to 3.0.2
@@ -58,14 +58,11 @@ /** @module gl-util/context */ | ||
// resize canvas | ||
var w, h | ||
if (o.container != document.body) { | ||
var bounds = o.container.getBoundingClientRect() | ||
w = o.width || (bounds.right - bounds.left) | ||
h = o.height || (bounds.bottom - bounds.top) | ||
o.canvas.width = o.width || (bounds.right - bounds.left) | ||
o.canvas.height = o.height || (bounds.bottom - bounds.top) | ||
} | ||
else { | ||
w = window.innerWidth | ||
h = window.innerHeight | ||
if (!document.body.style.width) o.canvas.width = o.pixelRatio * window.innerWidth | ||
if (!document.body.style.height) o.canvas.height = o.pixelRatio * window.innerHeight | ||
} | ||
o.canvas.width = o.pixelRatio * w | ||
o.canvas.height = o.pixelRatio * h | ||
@@ -72,0 +69,0 @@ // make sure there is context |
{ | ||
"name": "gl-util", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "Set of practical webgl utils", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29818
712