diff options
author | wout <wout@impinc.co.uk> | 2012-12-28 00:17:04 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-28 00:17:04 +0100 |
commit | 54cc2cc1aef573d247fd8cecf0870f67e2ffbd4e (patch) | |
tree | 6c1ab7cc9158a9ff24deaacfa526858636a90a8b /src | |
parent | d97618864b73d4347d231369403ebfb16cdf9d62 (diff) | |
download | svg.js-54cc2cc1aef573d247fd8cecf0870f67e2ffbd4e.tar.gz svg.js-54cc2cc1aef573d247fd8cecf0870f67e2ffbd4e.zip |
Added image size as arguments
Diffstat (limited to 'src')
-rw-r--r-- | src/container.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/container.js b/src/container.js index 74f28c2..9e73758 100644 --- a/src/container.js +++ b/src/container.js @@ -87,8 +87,9 @@ SVG.Container = { return e; }, - image: function(s) { - var e = new SVG.Image().load(s); + image: function(s, w, h) { + w = w != null ? w : 100; + var e = new SVG.Image().load(s).size(w, h != null ? h : w); this.add(e); return e; |