Fixed resize issue

This commit is contained in:
Devine Lu Linvega 2017-12-03 15:57:28 +13:00
parent d51cba89f9
commit b93db5b0cd
2 changed files with 5 additions and 1 deletions

View File

@ -32,4 +32,4 @@ svg.vector { z-index: 1000;position: relative; left:10px; top:10px; width:300px;
#interface.hidden { display: none;opacity: 0 }
#interface.visible { display: block; opacity: 1 }
#preview { position: absolute; top:20px; left:20px; stroke-dasharray: 4,4 }
#preview { position: absolute; top:20px; left:20px; stroke-dasharray: 4,4; }

View File

@ -389,6 +389,10 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
this.grid_y = size.height/15
this.svg_el.setAttribute("width",size.width+"px");
this.svg_el.setAttribute("height",size.height+"px");
this.preview_el.style.width = size.width+10
this.preview_el.style.height = size.height+10
this.preview_el.setAttribute("width",size.width+"px");
this.preview_el.setAttribute("height",size.height+"px");
dotgrid.guide.resize(size);
this.interface.update();