diff options
Diffstat (limited to 'js')
-rwxr-xr-x | js/controllers/document-controller.js | 9 | ||||
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/js/controllers/document-controller.js b/js/controllers/document-controller.js index fa611de4..1c9d9d59 100755 --- a/js/controllers/document-controller.js +++ b/js/controllers/document-controller.js | |||
@@ -84,8 +84,13 @@ var DocumentController = exports.DocumentController = Montage.create(Component, | |||
84 | // | 84 | // |
85 | handleAppLoaded: { | 85 | handleAppLoaded: { |
86 | value: function() { | 86 | value: function() { |
87 | //Adding an intercept to resources loaded to ensure user assets load from cloud simulator | 87 | //Checking for app to be loaded through extension |
88 | if (window.chrome.app.isInstalled) { | 88 | var check; |
89 | if (chrome && chrome.app) { | ||
90 | check = chrome.app.getDetails(); | ||
91 | } | ||
92 | if (check !== null) { | ||
93 | //Adding an intercept to resources loaded to ensure user assets load from cloud simulator | ||
89 | chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); | 94 | chrome.webRequest.onBeforeRequest.addListener(this.handleWebRequest.bind(this), {urls: ["<all_urls>"]}, ["blocking"]); |
90 | } | 95 | } |
91 | } | 96 | } |
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, { | |||
162 | return; | 162 | return; |
163 | } | 163 | } |
164 | 164 | ||
165 | // Hand tool | ||
165 | if(evt.keyCode === Keyboard.H ) { | 166 | if(evt.keyCode === Keyboard.H ) { |
166 | evt.preventDefault(); | 167 | evt.preventDefault(); |
167 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); | 168 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); |
168 | return; | 169 | return; |
169 | } | 170 | } |
170 | 171 | ||
172 | // Zoom tool | ||
171 | if(evt.keyCode === Keyboard.Z ) { | 173 | if(evt.keyCode === Keyboard.Z ) { |
172 | evt.preventDefault(); | 174 | evt.preventDefault(); |
173 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[16]}); | 175 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); |
174 | return; | 176 | return; |
175 | } | 177 | } |
176 | 178 | ||