diff options
author | wout <wout@impinc.co.uk> | 2014-06-17 20:38:38 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-06-17 20:38:38 +0200 |
commit | c1342e78f52c38f138ce550502cf27ef385cfc4a (patch) | |
tree | 75e1cb9e2ef96e23ac40ba4ac6bfbf3368ab1d9e /README.md | |
parent | 1c50b34aba8fe613f4002cc84b41411c0f546308 (diff) | |
download | svg.js-c1342e78f52c38f138ce550502cf27ef385cfc4a.tar.gz svg.js-c1342e78f52c38f138ce550502cf27ef385cfc4a.zip |
Updated README
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -2409,6 +2409,43 @@ Finally, to get a marker instance from the target element reference: path.reference('marker-end') ``` +### ref() +By default the `refX` and `refY` attributes of a marker are set to respectively half the `width` nd `height` values. To define the refX and refY of a marker differently: + +```javascript +marker.ref(5, 5) +``` + +### update() +Updating the contents of a marker will `clear()` the existing content and add the content defined in the block passed as the first argument: + +```javascript +marker.update(function(add) { + add.circle(10) +}) +``` + +### width() +Defines the `markerWidth` attribute: + +```javascript +marker.width(10) +``` + +### height() +Defines the `markerHeight` attribute: + +```javascript +marker.height(10) +``` + +### size() +Defines the `markerWidth` and `markerHeight` attributes: + +```javascript +marker.size(10, 10) +``` + ## Data |