This commit is contained in:
Devine Lu Linvega 2018-02-17 14:42:52 +13:00
parent 86e9534562
commit cc1735081d
2 changed files with 6 additions and 1 deletions

View File

@ -284,7 +284,9 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
{
var pos = this.position_in_grid(new Pos(e.clientX+5,e.clientY-5)); pos = this.position_on_grid(pos);
dotgrid.tool.remove_segments_at(pos);
this.draw();
e.preventDefault();
setTimeout(() => { dotgrid.tool.clear(); },150);
}
this.move_cursor = function(pos)

View File

@ -39,6 +39,9 @@ function Tool()
segment.verteces.splice(vertex_id,1)
}
}
if(segment.verteces.length < 2){
this.layers[this.index].splice(segment_id,1)
}
}
this.clear();
dotgrid.draw();