diff options
author | wout <wout@impinc.co.uk> | 2014-08-03 12:43:08 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-08-03 12:43:08 +0200 |
commit | 27527cdef1cb6846d57b5d316cf938d97cd30213 (patch) | |
tree | e62af3ba0264b5ea34e4dd143e3c28d96927516d /spec | |
parent | 4fec8a0c29df25163f7d766d0f15575c7a70a1c7 (diff) | |
download | svg.js-27527cdef1cb6846d57b5d316cf938d97cd30213.tar.gz svg.js-27527cdef1cb6846d57b5d316cf938d97cd30213.zip |
Removed node modules
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/spec/element.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/spec/element.js b/spec/spec/element.js index d7eae4a..d31ad44 100755 --- a/spec/spec/element.js +++ b/spec/spec/element.js @@ -164,6 +164,14 @@ describe('Element', function() { rect.transform({ x: 10, y: 11 }) expect(rect.node.getAttribute('transform')).toBe('matrix(1,0,0,1,10,11)') }) + it('performs an absolute translation', function() { + rect.transform({ x: 10, y: 11 }).transform({ x: 20, y: 21 }) + expect(rect.node.getAttribute('transform')).toBe('matrix(1,0,0,1,20,21)') + }) + it('performs a relative translation when add is set to true', function() { + rect.transform({ x: 10, y: 11 }).transform({ x: 20, y: 21, add: true }) + expect(rect.node.getAttribute('transform')).toBe('matrix(1,0,0,1,30,32)') + }) it('sets the scaleX and scaleY of and element', function() { rect.transform({ scaleX: 0.5, scaleY: 2 }) expect(rect.node.getAttribute('transform')).toBe('matrix(0.5,0,0,2,0,0)') |