Improved the bezier tool

This commit is contained in:
Devine Lu Linvega 2018-06-04 09:52:19 +12:00
parent 0cf0b05829
commit f7f7fb2aea
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ function Generator(layer,style)
}
else if(type == "bezier"){
html += next && after_next ?`Q${next.x},${next.y} ${after_next.x},${after_next.y} ` : '';
skip = 2
skip = 1
}
else{
console.warn(`unknown type:${type}`)

View File

@ -184,7 +184,7 @@ function Tool()
}
}
if(type == "bezier"){
if(this.vertices.length % 2 == 0){
if(this.vertices.length != 3 && this.vertices.length != 5 && this.vertices.length != 7 && this.vertices.length != 9){
return false;
}
}