diff options
Diffstat (limited to 'js/mediators')
-rw-r--r-- | js/mediators/element-mediator.js | 5 | ||||
-rw-r--r-- | js/mediators/keyboard-mediator.js | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 7c5c161c..1d0aef44 100644 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -92,6 +92,11 @@ exports.ElementMediator = Montage.create(NJComponent, { | |||
92 | _addElement: { | 92 | _addElement: { |
93 | value: function(el, rules, noEvent) { | 93 | value: function(el, rules, noEvent) { |
94 | ElementController.addElement(el, rules); | 94 | ElementController.addElement(el, rules); |
95 | var p3d = this.get3DProperties(el); | ||
96 | if(p3d) | ||
97 | { | ||
98 | el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); | ||
99 | } | ||
95 | if(!noEvent) NJevent("elementAdded", el); | 100 | if(!noEvent) NJevent("elementAdded", el); |
96 | } | 101 | } |
97 | }, | 102 | }, |
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 144932c0..a1fdead3 100644 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -178,6 +178,12 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
178 | return; | 178 | return; |
179 | } | 179 | } |
180 | 180 | ||
181 | if(evt.keyCode === Keyboard.H ) { | ||
182 | evt.preventDefault(); | ||
183 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); | ||
184 | return; | ||
185 | } | ||
186 | |||
181 | if(evt.keyCode === Keyboard.Z ) { | 187 | if(evt.keyCode === Keyboard.Z ) { |
182 | evt.preventDefault(); | 188 | evt.preventDefault(); |
183 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[16]}); | 189 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[16]}); |