aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMason Stewart <masondesu@gmail.com>2014-11-09 11:09:40 -0500
committerMason Stewart <masondesu@gmail.com>2014-11-09 11:09:40 -0500
commitc4ca1932dc593abe919219c0eb91c8bfea5646af (patch)
tree514c9ef0aca6438443a7d81c0e156b4b03fee19c
parent7984a87786effaed2ed6e517c899cc68204e4e6b (diff)
downloadsvg.js-c4ca1932dc593abe919219c0eb91c8bfea5646af.tar.gz
svg.js-c4ca1932dc593abe919219c0eb91c8bfea5646af.zip
Added missing `.bbox()` calls to merge example
Hey there. I may be misunderstanding, so feel free to dismiss this, but the `merge` method example for `BBox` wasn't working. I looked at the source for a few minutes, and realized that the first two lines in the example were missing a call to `bbox`, since `merge` belongs to `BBox` instances, not `Rect` instances. Thanks for making such a great lib. Really enjoying it so far :sparkles:
-rwxr-xr-xREADME.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index 8066600..9f016be 100755
--- a/README.md
+++ b/README.md
@@ -1450,8 +1450,8 @@ As opposed to the native `getBBox()` method any translations used with the `tran
The `SVG.BBox` has one other nifty 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 box1 = draw.rect(100,100).move(50,50).bbox()
+var box2 = draw.rect(100,100).move(200,200).bbox()
var box3 = box1.merge(box2)
```