Added symmetry to preview
This commit is contained in:
parent
932b5af7c7
commit
6fe5a91799
@ -368,7 +368,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
|
|||||||
this.preview = function(operation)
|
this.preview = function(operation)
|
||||||
{
|
{
|
||||||
if(this.preview_prev == operation){ return; }
|
if(this.preview_prev == operation){ return; }
|
||||||
this.preview_el.innerHTML = !operation ? `<path d='M0,0'></path>` : `<path d='${dotgrid.tool.path([{type:operation,verteces:dotgrid.tool.verteces}])}'></path>`;
|
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>`;
|
||||||
this.preview_prev = operation;
|
this.preview_prev = operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,9 +164,9 @@ function Tool()
|
|||||||
return this.verteces.length >= this.reqs[type];
|
return this.verteces.length >= this.reqs[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
this.path = function(layer_id = 0)
|
this.path = function(layer_id = 0, preview = null)
|
||||||
{
|
{
|
||||||
var layer = this.layers[layer_id];
|
var layer = preview ? preview : this.layers[layer_id];
|
||||||
|
|
||||||
var html = "";
|
var html = "";
|
||||||
for(id in layer){
|
for(id in layer){
|
||||||
|
Loading…
Reference in New Issue
Block a user