Skip to content

Commit

Permalink
feat(dmn): add DRD canvas move menu+keybindings
Browse files Browse the repository at this point in the history
Related to #1016
  • Loading branch information
nikku committed Nov 20, 2018
1 parent 82f757f commit 52f3619
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions app/lib/menu/menu-builder.js
Expand Up @@ -794,6 +794,50 @@ MenuBuilder.prototype.appendDmnActions = function() {

this.appendSeparator();

this.menu.append(new MenuItem({
label: 'Move Canvas',
enabled: this.opts.state.inactiveInput,
submenu: Menu.buildFromTemplate([{
label: 'Move Up',
accelerator: 'CommandOrControl + Up',
click: function() {
app.emit('menu:action', 'moveCanvas', {
direction: 'up',
speed: 50
});
}
}, {
label: 'Move Left',
accelerator: 'CommandOrControl + Left',
click: function() {
app.emit('menu:action', 'moveCanvas', {
direction: 'left',
speed: 50
});
}
}, {
label: 'Move Down',
accelerator: 'CommandOrControl + Down',
click: function() {
app.emit('menu:action', 'moveCanvas', {
direction: 'down',
speed: 50
});
}
}, {
label: 'Move Right',
accelerator: 'CommandOrControl + Right',
click: function() {
app.emit('menu:action', 'moveCanvas', {
direction: 'right',
speed: 50
});
}
}])
}));

this.appendSeparator();

this.appendSelectAll();

this.appendRemoveSelection();
Expand Down

0 comments on commit 52f3619

Please sign in to comment.