Reflect size change on dotgrid

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

View File

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

View File

@ -3,11 +3,12 @@ function Picker()
this.memory = "";
this.el = document.createElement("input");
this.el.id = "picker"
this.el.setAttribute("placeholder","#ff0000")
this.original = null;
this.start = function()
{
this.el.setAttribute("placeholder",`#${dotgrid.tool.style().color} ${dotgrid.width}x${dotgrid.height}`)
dotgrid.controller.set("picker");
dotgrid.interface.el.className = "picker"
this.el.focus()