diff --git a/public/javascripts/spacedeck_sections.js b/public/javascripts/spacedeck_sections.js index 910abfc..6758a8c 100644 --- a/public/javascripts/spacedeck_sections.js +++ b/public/javascripts/spacedeck_sections.js @@ -8,6 +8,8 @@ var SpacedeckSections = { data: { MAX_COLUMNS: 20, + isShift: false, + redo_stack: [], undo_stack: [], @@ -206,7 +208,9 @@ var SpacedeckSections = { Mousetrap.bind('shift+left', function(evt) { this.if_editable(function() {this.nudge_selected_artifacts(-10,0,evt);}) }.bind(this)); Mousetrap.bind('shift+right', function(evt) { this.if_editable(function() {this.nudge_selected_artifacts(10,0,evt);}) }.bind(this)); Mousetrap.bind('space', function(evt) { this.activate_pan_tool(evt); }.bind(this)); - + Mousetrap.bind(['shift'], function(evt) { this.isShift = true; }.bind(this), 'keydown'); + Mousetrap.bind(['shift'], function(evt) { this.isShift = false; }.bind(this), 'keyup'); + Mousetrap.bind('shift+up', function(evt) { this.if_editable(function() {this.nudge_selected_artifacts(0,-10,evt);}) }.bind(this)); $(document).bind("beforecopy", this.handle_onbeforecopy.bind(this)); $(window).bind("beforeunload", this.handle_onunload.bind(this)); $(window).bind("resize", this.handle_window_resize.bind(this)); @@ -2292,17 +2296,19 @@ var SpacedeckSections = { for (var i=0; i