Can now hide control points.

This commit is contained in:
Devine Lu Linvega 2018-01-20 09:54:44 +13:00
parent 79163187cf
commit be2b69c723
5 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -29,7 +29,7 @@ app.win = null;
app.on('ready', () =>
{
app.win = new BrowserWindow({width: 400, height: 420, minWidth: 400, minHeight: 400, backgroundColor:"#000", frame:false, autoHideMenuBar: true, icon: __dirname + '/icon.ico'})
app.win = new BrowserWindow({width: 400, height: 420, minWidth: 400, minHeight: 420, backgroundColor:"#000", frame:false, autoHideMenuBar: true, icon: __dirname + '/icon.ico'})
app.win.loadURL(`file://${__dirname}/sources/index.html`);

View File

@ -12,13 +12,9 @@
"push_osx" : "~/butler push ~/Desktop/Dotgrid-darwin-x64/ hundredrabbits/dotgrid:osx-64",
"push_linux" : "~/butler push ~/Desktop/Dotgrid-linux-x64/ hundredrabbits/dotgrid:linux-64",
"push_win" : "~/butler push ~/Desktop/Dotgrid-win32-x64/ hundredrabbits/dotgrid:windows-64",
"push_theme" : "~/butler push ~/Github/HundredRabbits/Themes/themes/ hundredrabbits/dotgrid:themes",
"push_status" : "~/butler status hundredrabbits/dotgrid",
"theme" : "npm run theme_osx ; npm run theme_linux ; npm run theme_win",
"theme_osx" : "cp -R ~/Github/HundredRabbits/Themes/themes ~/Desktop/Dotgrid-darwin-x64/",
"theme_linux" : "cp -R ~/Github/HundredRabbits/Themes/themes ~/Desktop/Dotgrid-linux-x64/",
"theme_win" : "cp -R ~/Github/HundredRabbits/Themes/themes ~/Desktop/Dotgrid-win32-x64/",
"docs" : "electron . docs",
"push" : "npm run build ; npm run theme ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run push_status"
"push" : "npm run build ; npm run push_theme ; npm run push_osx ; npm run push_linux ; npm run push_win ; npm run clean ; npm run push_status"
},
"devDependencies": {
"electron": "^1.8.1"

View File

@ -163,6 +163,7 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca
this.controller.add("default","View","Tools",() => { dotgrid.interface.toggle(); },";");
this.controller.add("default","View","Grid",() => { dotgrid.guide.toggle(); },"H");
this.controller.add("default","View","Control Points",() => { dotgrid.guide.toggle_widgets(); },"J");
this.controller.add("default","View","Expert",() => { dotgrid.interface.toggle_zoom(); },":");
this.controller.commit();

View File

@ -25,6 +25,11 @@ function Guide()
this.el.style.opacity = !this.el.style.opacity || this.el.style.opacity == 1 ? 0 : 1;
}
this.toggle_widgets = function()
{
this.widgets.style.opacity = !this.widgets.style.opacity || this.widgets.style.opacity == 1 ? 0 : 1;
}
this.draw = function()
{
for (var x = dotgrid.grid_x; x >= 0; x--) {