Skip to content

Commit

Permalink
selectAll hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
kicktheken committed Mar 20, 2013
1 parent 903d987 commit 5b37b4b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions client/js/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,17 @@ define(["actions","layer","canvas"],function Engine(Actions, Layer, Canvas) {
}
_this.refresh(cx,cy);
},
selectAll: function() {
if (mode !== 'select') {
mode = 'select';
$('[name="radio"]').removeAttr("checked").button('refresh');
// jquery ui bug? have to explicitly highlight
$('label[for="select"]').addClass("ui-state-active");
}
_this.unloadSelected();
selected = { width:g.width, height:g.height, x:0, y:0, done:true};
_this.refresh();
},
setDimensions: function(width,height) {
width = parseInt(width);
height = parseInt(height);
Expand Down
1 change: 1 addition & 0 deletions client/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ function Main(Engine) {
key('⌘+c, ctrl+c', engine.copy);
key('⌘+x, ctrl+x', engine.cut);
key('⌘+v, ctrl+v', engine.paste);
key('⌘+a, ctrl+a', engine.selectAll);
key('⌘+shift+s, ctrl+shift+s', engine.purge); // purge corrupted workspace

$('#searchbox').keyup(function(e) {
Expand Down

0 comments on commit 5b37b4b

Please sign in to comment.