Minor cleanup

This commit is contained in:
Devine Lu Linvega
2019-01-09 15:49:34 +12:00
parent e79fae8a49
commit 1d574d43c0
8 changed files with 136 additions and 140 deletions

View File

@@ -12,12 +12,12 @@ document.onkeyup = (e) =>
if((e.ctrlKey || e.metaKey) && ch == "e"){ DOTGRID.export(); e.preventDefault(); return; }
if(ch == "backspace" && e.ctrlKey){ DOTGRID.theme.reset(); e.preventDefault(); }
if(ch == "backspace"){ DOTGRID.tool.remove_segment(); e.preventDefault(); }
if(ch == "backspace"){ DOTGRID.tool.removeSegment(); e.preventDefault(); }
if(ch == "escape"){ DOTGRID.tool.clear(); DOTGRID.picker.stop(); e.preventDefault(); }
if(ch == "1"){ DOTGRID.tool.select_layer(0); e.preventDefault(); }
if(ch == "2"){ DOTGRID.tool.select_layer(1); e.preventDefault(); }
if(ch == "3"){ DOTGRID.tool.select_layer(2); e.preventDefault(); }
if(ch == "1"){ DOTGRID.tool.selectLayer(0); e.preventDefault(); }
if(ch == "2"){ DOTGRID.tool.selectLayer(1); e.preventDefault(); }
if(ch == "3"){ DOTGRID.tool.selectLayer(2); e.preventDefault(); }
if(ch == "h"){ DOTGRID.renderer.toggle(); e.preventDefault(); }
if(ch == "?"){ DOTGRID.reset(); DOTGRID.theme.reset(); e.preventDefault(); }
@@ -47,5 +47,5 @@ document.onkeyup = (e) =>
document.onkeydown = (e) =>
{
if(e.keyCode == 9){ DOTGRID.tool.select_next_layer(); e.preventDefault(); }
if(e.keyCode == 9){ DOTGRID.tool.selectNextLayer(); e.preventDefault(); }
}