diff options
author | wout <wout@impinc.co.uk> | 2014-03-04 22:19:01 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-03-04 22:19:01 +0100 |
commit | 1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1 (patch) | |
tree | b39257a6256836b9e645f5e5faf37adcbe8d4c4d /README.md | |
parent | f3b9e808601e8aa250b9373447527ca67ba75ec4 (diff) | |
download | svg.js-1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1.tar.gz svg.js-1286e3de26baa3d75ec6a6eafbb2eaa11305c2e1.zip |
Bumped to 1.0.0-rc.6
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 25 |
1 files changed, 24 insertions, 1 deletions
@@ -529,6 +529,10 @@ text.clear() __`returns`: `itself`__ +### lines +All added tspans are stored in the `lines` reference, which is an instance of `SVG.Set`. + + ## TSpan The tspan elements are only available inside text elements or inside other tspan elements. In svg.js they have a class of their own: @@ -1330,7 +1334,7 @@ path.bbox() This will return an instance of `SVG.BBox` containing the following values: ```javascript -{ width: 20, height: 20, x: 10, y: 20, cx: 30, cy: 20 } +{ width: 20, height: 20, x: 10, y: 20, cx: 20, cy: 30, x2: 30, y2: 40 } ``` As opposed to the native `getBBox()` method any translations used with the `transform()` method will be taken into account. @@ -1498,6 +1502,14 @@ rect.animate().move(200, 200) rect.animate().center(200, 200) ``` +By calling `stop()`, the transition is left at its current position. By passing `true` as the first argument to `stop()`, the animation will be fulfilled instantly: + +```javascript +rect.animate().move(200, 200) + +rect.stop(true) +``` + Stopping an animation is irreversable. __`returns`: `itself`__ @@ -2712,6 +2724,17 @@ Note that this method is only available on `SVG.PointArray` and `SVG.PathArray` __`returns`: `itself`__ +### reverse() +Reverses the order of the array: + +```javascript +var array = new SVG.PointArray([[0, 0], [100, 100]]) +array.reverse() +array.toString() //-> returns '100,100 0,0' +``` + +__`returns`: `itself`__ + ### bbox() Gets the bounding box of the geometry of the array: |