Merge branch pull/1915 Fixed hotkeys for changing font size

This commit is contained in:
nightwing 2014-04-18 14:23:11 +04:00
commit 3631e7f720

View file

@ -184,21 +184,21 @@ env.editor.commands.addCommands([{
}
}, {
name: "increaseFontSize",
bindKey: "Ctrl-+",
bindKey: "Ctrl-=|Ctrl-+",
exec: function(editor) {
var size = parseInt(editor.getFontSize(), 10) || 12;
editor.setFontSize(size + 1);
}
}, {
name: "decreaseFontSize",
bindKey: "Ctrl+-",
bindKey: "Ctrl+-|Ctrl-_",
exec: function(editor) {
var size = parseInt(editor.getFontSize(), 10) || 12;
editor.setFontSize(Math.max(size - 1 || 1));
}
}, {
name: "resetFontSize",
bindKey: "Ctrl+0",
bindKey: "Ctrl+0|Ctrl-Numpad0",
exec: function(editor) {
editor.setFontSize(12);
}