Merge pull request #22 from zenozeng/lineto-pr
when lineTo called, use M instead of L unless subpath exists
This commit is contained in:
commit
32b567c325
@ -558,7 +558,11 @@
|
||||
* Adds a line to command
|
||||
*/
|
||||
ctx.prototype.lineTo = function(x, y){
|
||||
if (this.__currentDefaultPath.indexOf('M') > -1) {
|
||||
this.__addPathCommand(format("L {x} {y}", {x:x, y:y}));
|
||||
} else {
|
||||
this.__addPathCommand(format("M {x} {y}", {x:x, y:y}));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user