From 24a5f2b497fd3e78d5342e7566838e78dcfa8746 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 23 Feb 2012 14:58:03 -0800 Subject: fixing the tools shortcuts - IKNINJA 1199 Signed-off-by: Valerio Virgillito --- js/mediators/keyboard-mediator.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'js/mediators/keyboard-mediator.js') diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 0282060f..a4bf9baa 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -162,15 +162,17 @@ exports.KeyboardMediator = Montage.create(Component, { return; } + // Hand tool if(evt.keyCode === Keyboard.H ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); return; } + // Zoom tool if(evt.keyCode === Keyboard.Z ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[16]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); return; } -- cgit v1.2.3 From d4a110bf2c7a949c627966ed01db7a4d32d62757 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 24 Feb 2012 10:04:19 -0800 Subject: Adding back Ink Bottle tool in the tool bar so QE can test ink bottle functionality without having to wait for the new icon and location of the tool. Signed-off-by: Nivesh Rajbhandari --- js/mediators/keyboard-mediator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/mediators/keyboard-mediator.js') diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index a4bf9baa..5b044f8a 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -165,14 +165,14 @@ exports.KeyboardMediator = Montage.create(Component, { // Hand tool if(evt.keyCode === Keyboard.H ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); return; } // Zoom tool if(evt.keyCode === Keyboard.Z ) { evt.preventDefault(); - this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); + this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); return; } -- cgit v1.2.3 From b056b4bef5982466d80d72e5cbb31e63087990e1 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 24 Feb 2012 15:30:55 -0800 Subject: - added closeDocument event for timeline - minor bug fixes Signed-off-by: Ananya Sen --- js/mediators/keyboard-mediator.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'js/mediators/keyboard-mediator.js') diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index a4bf9baa..f05d3382 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -207,7 +207,13 @@ exports.KeyboardMediator = Montage.create(Component, { // Check if cmd+s/ctrl+s for Save (Windows/Mac) if ((evt.keyCode == Keyboard.S) && (evt.ctrlKey || evt.metaKey) && !evt.shiftKey) { - NJevent("executeSave"); + try{ + NJevent("executeSave"); + } + catch(e){ + console.warn("Unable to save"); + console.log(e.stack); + } evt.preventDefault(); return; } -- cgit v1.2.3