]> source.dussan.org Git - svg.js.git/commitdiff
Updated README
authorwout <wout@impinc.co.uk>
Sun, 24 Aug 2014 14:32:30 +0000 (16:32 +0200)
committerwout <wout@impinc.co.uk>
Sun, 24 Aug 2014 14:32:30 +0000 (16:32 +0200)
README.md

index 06f671e909d5acc5a47b0b3f3d8a7028c8a8cf66..4481437e2f710f332c2e15a6524f8d1f0af1409d 100755 (executable)
--- a/README.md
+++ b/README.md
@@ -1108,9 +1108,20 @@ rect.attr('fill', null)
 
 
 ### transform()
-The `transform()` method acts as a full getter without an argument. Basically it calls `element.ctm().extract()`.
+The `transform()` method acts as a full getter without an argument. Basically it calls:
+
+```javascript
+element.ctm().extract()
+```
+
+As a setter it has two ways of working. By default transformations are absolute. For example, if you call:
+
+```javascript
+element.transform({ rotation: 125 }).transform({ rotation: 37.5 })
+```
+
+The resulting rotation will be `37.5` and not the sum of the two transformations. But if that's what you want there is a way out by adding the `relative` parameter. That would be:
 
-As a setter it has two ways of working. By default transformations are absolute. For example, if you call `element.transform({ rotation: 125 }).transform({ rotation: 37.5 })` the resulting rotation will be `37.5` and not the sum of the two transformations. But if that's what you want there is a way out by adding the `add` parameter. That would be: 
 
 ```javascript
 element.transform({ rotation: 125 }).transform({ rotation: 37.5, relative: true })