Improved new file/history

This commit is contained in:
Devine Lu Linvega
2018-02-05 10:09:46 +13:00
parent a440752f73
commit e98978249c
2 changed files with 9 additions and 4 deletions

View File

@@ -193,9 +193,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
this.new = function()
{
dotgrid.segments = [];
dotgrid.history.push(dotgrid.segments)
dotgrid.draw();
dotgrid.clear();
}
this.save = function()
@@ -663,6 +661,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
this.clear = function()
{
this.history.clear();
this.reset();
this.segments = [];
this.thickness = 10