mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-23 12:45:48 +00:00
Add spec for multiple M/m commands being preserved.
This wasn't ever broken, but taken with the previous spec it makes more clear that there's a difference between `M 1,2 3,4` and `M 1,2 M 3,4`.
This commit is contained in:
parent
ff04efdc76
commit
7d0c9ebb28
1 changed files with 14 additions and 0 deletions
|
|
@ -224,6 +224,20 @@
|
|||
});
|
||||
});
|
||||
|
||||
asyncTest('multiple M/m commands preserved as M/m commands', function() {
|
||||
var el = getPathElement('M100 100 M 200 200 M150 50 m 300 300 m 400 -50 m 50 100');
|
||||
fabric.Path.fromElement(el, function(obj) {
|
||||
|
||||
deepEqual(obj.path[0], ['M', 100, 100]);
|
||||
deepEqual(obj.path[1], ['M', 200, 200]);
|
||||
deepEqual(obj.path[2], ['M', 150, 50]);
|
||||
deepEqual(obj.path[3], ['m', 300, 300]);
|
||||
deepEqual(obj.path[4], ['m', 400, -50]);
|
||||
deepEqual(obj.path[5], ['m', 50, 100]);
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
asyncTest('compressed path commands', function() {
|
||||
var el = getPathElement('M56.224 84.12c-.047.132-.138.221-.322.215.046-.131.137-.221.322-.215z');
|
||||
fabric.Path.fromElement(el, function(obj) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue