Implementing canvas resize

This commit is contained in:
Devine Lu Linvega
2018-05-07 11:05:25 +12:00
parent aa87b3514d
commit 26acf47e50
2 changed files with 50 additions and 6 deletions

View File

@@ -432,6 +432,8 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y)
}
this.set_size = function(size = {width:300,height:300},interface = true)
{
if(size.width < 50 || size.height < 50){ return; }
var win = require('electron').remote.getCurrentWindow();
win.setSize(size.width+100,size.height+100+(interface ? 10 : 0),true);