summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-27 14:41:13 +0100
committerwout <wout@impinc.co.uk>2012-12-27 14:41:13 +0100
commita68cfccf86582dd62d3474adde48d85fc2095e04 (patch)
treea986a2254879924f2e44970f0d5b7509386558b5 /src
parent9501ce94a95d2ec6834f9f1931557602901b960a (diff)
downloadsvg.js-a68cfccf86582dd62d3474adde48d85fc2095e04.tar.gz
svg.js-a68cfccf86582dd62d3474adde48d85fc2095e04.zip
Fix in bbox90 for IE
Diffstat (limited to 'src')
-rw-r--r--src/element.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/element.js b/src/element.js
index bff8979..33813c4 100644
--- a/src/element.js
+++ b/src/element.js
@@ -127,15 +127,17 @@ SVG.extend(SVG.Element, {
// actual bounding box
var b = this.node.getBBox();
- // include translations on x an y
- b.x += this.trans.x;
- b.y += this.trans.y;
-
- // add the center
- b.cx = b.x + b.width / 2;
- b.cy = b.y + b.height / 2;
-
- return b;
+ return {
+ // include translations on x an y
+ x: b.x + this.trans.x,
+ y: b.x + this.trans.y,
+ // add the center
+ cx: b.x + this.trans.x + b.width / 2,
+ cy: b.x + this.trans.y + b.height / 2,
+ // plain width and height
+ width: b.width,
+ height: b.height
+ };
},
// private: find svg parent