Fixed tiny error with preview

This commit is contained in:
Devine Lu Linvega
2018-05-07 11:23:02 +12:00
parent 80f5ff3937
commit ab0a7b8ca0
2 changed files with 4 additions and 3 deletions

View File

@@ -367,8 +367,9 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
this.preview = function(operation)
{
if(this.preview_prev == operation){ return; }
this.preview_el.innerHTML = !operation ? `<path d='M0,0'></path>` : `<path d='${dotgrid.tool.path(dotgrid.tool.index,[{type:operation,verteces:dotgrid.tool.verteces}])}'></path>`;
if(this.preview_prev == operation ){ return; }
this.preview_el.innerHTML = !operation || operation == "close" ? `<path d='M0,0'></path>` : `<path d='${dotgrid.tool.path(dotgrid.tool.index,[{type:operation,verteces:dotgrid.tool.verteces}])}'></path>`;
this.preview_prev = operation;
}