aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-06-29 09:56:37 +0100
committerwout <wout@impinc.co.uk>2013-06-29 09:56:37 +0100
commitb8f4400075126d9da64c5403333baa3c52048507 (patch)
treef49c70128dc3f666a4372a163fdbffdb0b7a409e /README.md
parentfd9be25e66ce406c2c2081af8c8cb44357357639 (diff)
downloadsvg.js-b8f4400075126d9da64c5403333baa3c52048507.tar.gz
svg.js-b8f4400075126d9da64c5403333baa3c52048507.zip
Fixed naming conflict in mask and clip modules, bumped to v0.22
Diffstat (limited to 'README.md')
-rw-r--r--README.md36
1 files changed, 34 insertions, 2 deletions
diff --git a/README.md b/README.md
index 9ab8704..288b651 100644
--- a/README.md
+++ b/README.md
@@ -785,12 +785,26 @@ var ellipse = draw.ellipse(80, 40).move(10, 10).fill({ color: gradient })
rect.maskWith(ellipse)
```
-For your convenience, the masking element is also referenced in the masked element. This would be useful in case you want to change, or remove the mask:
+For your convenience, the masking element is also referenced in the masked element. This can be useful in case you want to change the mask:
```javascript
-rect.mask.remove()
+rect.masker.fill('#fff')
```
+Unmasking the elements can be done with the `unmask()` method:
+
+```javascript
+rect.unmask()
+```
+
+Removing the mask alltogether will also `unmask()` all masked elements:
+
+```javascript
+rect.masker.remove()
+```
+
+The `unmask()` method returns the masking element. So if you would like to remove the
+
_This functionality requires the mask.js module which is included in the default distribution._
@@ -803,6 +817,24 @@ var ellipse = draw.ellipse(80, 40).move(10, 10).fill({ color: '#fff' })
rect.clipWith(ellipse)
```
+Similar to masking, the clipping element can be referenced in the clipped element:
+
+```javascript
+rect.clipper.move(20,30)
+```
+
+Unclipping the elements can be done with the `unclip()` method:
+
+```javascript
+rect.unclip()
+```
+
+Removing the clipPath alltogether will also `unclip()` all clipped elements:
+
+```javascript
+rect.clipper.remove()
+```
+
_This functionality requires the clip.js module which is included in the default distribution._