when lineTo called, use M instead of L unless subpath exists
This commit is contained in:
parent
a186bb9a95
commit
f5b2692a88
@ -558,7 +558,11 @@
|
|||||||
* Adds a line to command
|
* Adds a line to command
|
||||||
*/
|
*/
|
||||||
ctx.prototype.lineTo = function(x, y){
|
ctx.prototype.lineTo = function(x, y){
|
||||||
|
if (this.__currentDefaultPath.indexOf('M') > -1) {
|
||||||
this.__addPathCommand(format("L {x} {y}", {x:x, y:y}));
|
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