Animated canvas size.
This commit is contained in:
@@ -370,18 +370,10 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
|
||||
this.draw();
|
||||
}
|
||||
|
||||
this.zoom = false;
|
||||
|
||||
this.toggle_zoom = function()
|
||||
{
|
||||
dotgrid.set_size(!dotgrid.zoom ? {width:600,height:600} : {width:300,height:300})
|
||||
dotgrid.zoom = dotgrid.zoom ? false : true;
|
||||
}
|
||||
|
||||
this.set_size = function(size = {width:300,height:300})
|
||||
this.set_size = function(size = {width:300,height:300},interface = true)
|
||||
{
|
||||
var win = require('electron').remote.getCurrentWindow();
|
||||
win.setSize(size.width+100,size.height+120);
|
||||
win.setSize(size.width+100,size.height+100+(interface ? 10 : 0),true);
|
||||
|
||||
this.width = size.width
|
||||
this.height = size.height
|
||||
|
||||
Reference in New Issue
Block a user