Skip to content
Snippets Groups Projects
Commit d6be199b authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

in progress

parent d401b46e
Branches
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@ NavBar = Backbone.View.extend({
events: {
"click #showHideMenu": "_setMenuVis",
"click .menuHoverControls": "_setNavSelection",
"click #saveAs": "_saveAs",
"click #saveAsJSON": "_saveAs",
"click #importJSON": "_importJSON",
"change #jsonInput": "_selectJSONFiles",
},
......
......@@ -104,12 +104,15 @@ AppState = Backbone.Model.extend({
var state = e.data.state;
var currentTab = this.get("currentTab");
if (state) {
if (e.ctrlKey || e.metaKey){
}else if (state) {
if (this.downKeys[e.keyCode]) return;
this.downKeys[e.keyCode] = true;
} else this.downKeys[e.keyCode] = null;
} else this.downKeys[e.keyCode] = false;
// console.log(e.keyCode);
console.log(e.keyCode);
switch(e.keyCode){
case 16://shift
e.preventDefault();
......@@ -132,6 +135,13 @@ AppState = Backbone.Model.extend({
case 73://i inverse mode
this.lattice.set("inverseMode", !this.lattice.get("inverseMode"));
break;
case 83://s save
// e.preventDefault();
// if (e.ctrlKey || e.metaKey){//command
// console.log("here");
// dmaGlobals.lattice.saveAsJSON();
// }
break;
default:
break;
}
......
......@@ -96,7 +96,7 @@
<span class="dropdown-arrow"></span>
<ul class="dropdown-menu">
<li><a id="importJSON" href="#">Import Lattice JSON</a></li>
<li><a id="saveAs" href="#">Save Lattice JSON</a></li>
<li><a id="saveAsJSON" href="#">Save Lattice JSON</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment