aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xREADME.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index 438d2d8..a6546c7 100755
--- a/README.md
+++ b/README.md
@@ -725,6 +725,21 @@ __`returns`: `SVG.Use`__
_Javascript inheritance stack: `SVG.Use` < `SVG.Shape` < `SVG.Element`_
+## Symbol
+Not unlike the `group` element, the `symbol` element is a container element. The only difference between symbols and groups is that symbols are not rendered. Therefore a `symbol` element is ideal in combination with the `use` element:
+
+
+```javascript
+var symbol = draw.symbol()
+symbol.rect(100, 100).fill('#f09')
+
+var use = draw.use(symbol).move(200, 200)
+```
+
+__`returns`: `SVG.Symbol`__
+
+_Javascript inheritance stack: `SVG.Use` < `SVG.Container` < `SVG.Symbol`_
+
## Referencing elements
@@ -2409,6 +2424,7 @@ 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:
@@ -2416,6 +2432,8 @@ By default the `refX` and `refY` attributes of a marker are set to respectively
marker.ref(2, 7)
```
+__`returns`: `itself`__
+
### 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:
@@ -2425,6 +2443,8 @@ marker.update(function(add) {
})
```
+__`returns`: `itself`__
+
### width()
Defines the `markerWidth` attribute:
@@ -2432,6 +2452,8 @@ Defines the `markerWidth` attribute:
marker.width(10)
```
+__`returns`: `itself`__
+
### height()
Defines the `markerHeight` attribute:
@@ -2439,6 +2461,8 @@ Defines the `markerHeight` attribute:
marker.height(10)
```
+__`returns`: `itself`__
+
### size()
Defines the `markerWidth` and `markerHeight` attributes:
@@ -2446,6 +2470,8 @@ Defines the `markerWidth` and `markerHeight` attributes:
marker.size(10, 10)
```
+__`returns`: `itself`__
+
## Data