elastic-svg
Advanced tools
Comparing version 0.0.3 to 0.0.4
13
index.js
@@ -48,3 +48,2 @@ (function() { | ||
function resize() { | ||
console.log(parent) | ||
base.width = parent.clientWidth; | ||
@@ -94,2 +93,14 @@ base.height = base.width * opts.aspect; | ||
base.changeAspect = function(aspect) { | ||
opts.aspect = aspect; | ||
base.height = base.width * opts.aspect; | ||
svg.setAttributeNS(null, "height", base.height); | ||
} | ||
base.changeHeight = function(height) { | ||
base.height = height; | ||
opts.aspect = base.height / base.width; | ||
svg.setAttributeNS(null, "height", base.height); | ||
} | ||
base.svg = svg; | ||
@@ -96,0 +107,0 @@ return base; |
{ | ||
"name": "elastic-svg", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Responsive SVGs with no dependencies", | ||
@@ -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
26784
101