summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-05-28 21:09:26 +0100
committerwout <wout@impinc.co.uk>2013-05-28 21:09:26 +0100
commit6b1740abb72a113a35b499acf15a96945876122f (patch)
treed5b62d12a068bfbfd88d0002a438db894034547d
parentc7df993012b3c0e8cfee75313041c3c64ad9b9e1 (diff)
downloadsvg.js-6b1740abb72a113a35b499acf15a96945876122f.tar.gz
svg.js-6b1740abb72a113a35b499acf15a96945876122f.zip
Updated README
-rw-r--r--README.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/README.md b/README.md
index 208f5e9..802ca59 100644
--- a/README.md
+++ b/README.md
@@ -474,8 +474,15 @@ This will return an instance of `SVG.BBox` containing the following values:
{ height: 20, width: 20, y: 20, x: 10, cx: 30, cy: 20 }
```
-As opposed to the native `getBBox()` method any translations used with the `transform()` method will be taken into account.
+As opposed to the native `getBBox()` method any translations used with the `transform()` method will be taken into account.
+The `SVG.BBox` has one other nify little feature, enter the `merge()` method. With `merge()` two `SVG.BBox` instances can be merged into one new instance, basically being the bounding box of the two original bounding boxes:
+
+```javascript
+var box1 = draw.rect(100,100).move(50,50)
+var box2 = draw.rect(100,100).move(200,200)
+var box3 = box1.merge(box2)
+```
### Rectagular box
Is similar to `bbox()` but will give you the box around the exact representation of the element, taking all transformations into account.