summaryrefslogtreecommitdiffstats
path: root/src/bbox.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-03-04 22:19:01 +0100
committerwout <wout@impinc.co.uk>2014-03-04 22:19:01 +0100
commit1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1 (patch)
treeb39257a6256836b9e645f5e5faf37adcbe8d4c4d /src/bbox.js
parentf3b9e808601e8aa250b9373447527ca67ba75ec4 (diff)
downloadsvg.js-1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1.tar.gz
svg.js-1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1.zip
Bumped to 1.0.0-rc.6
Diffstat (limited to 'src/bbox.js')
-rwxr-xr-xsrc/bbox.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bbox.js b/src/bbox.js
index 603b6c9..c68bec5 100755
--- a/src/bbox.js
+++ b/src/bbox.js
@@ -1,4 +1,4 @@
-
+
SVG.BBox = function(element) {
var box
@@ -31,10 +31,9 @@ SVG.BBox = function(element) {
this.width = box.width * element.trans.scaleX
this.height = box.height * element.trans.scaleY
}
-
- /* add the center */
- this.cx = this.x + this.width / 2
- this.cy = this.y + this.height / 2
+
+ /* add center, right and bottom */
+ boxProperties(this)
}
@@ -50,9 +49,8 @@ SVG.extend(SVG.BBox, {
b.width = Math.max(this.x + this.width, box.x + box.width) - b.x
b.height = Math.max(this.y + this.height, box.y + box.height) - b.y
- /* add the center */
- b.cx = b.x + b.width / 2
- b.cy = b.y + b.height / 2
+ /* add center, right and bottom */
+ boxProperties(b)
return b
}