aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/data/tools-data.js6
-rw-r--r--js/mediators/keyboard-mediator.js6
-rw-r--r--js/panels/properties/content.reel/content.js18
3 files changed, 25 insertions, 5 deletions
diff --git a/js/data/tools-data.js b/js/data/tools-data.js
index 8ea84574..de965dbc 100644
--- a/js/data/tools-data.js
+++ b/js/data/tools-data.js
@@ -37,7 +37,7 @@ exports.ToolsData = Montage.create(Montage, {
37 "properties": "rotate3DProperties", 37 "properties": "rotate3DProperties",
38 "spriteSheet": true, 38 "spriteSheet": true,
39 "action": "Rotate3DTool", 39 "action": "Rotate3DTool",
40 "toolTip": "3D Rotate Object Tool", 40 "toolTip": "3D Rotate Object Tool (W)",
41 "cursor": "auto", 41 "cursor": "auto",
42 "lastInGroup": false, 42 "lastInGroup": false,
43 "container": false, 43 "container": false,
@@ -48,7 +48,7 @@ exports.ToolsData = Montage.create(Montage, {
48 "properties": "translate3DProperties", 48 "properties": "translate3DProperties",
49 "spriteSheet": true, 49 "spriteSheet": true,
50 "action": "Translate3DTool", 50 "action": "Translate3DTool",
51 "toolTip": "3D Translate Object Tool", 51 "toolTip": "3D Translate Object Tool (G)",
52 "cursor": "auto", 52 "cursor": "auto",
53 "lastInGroup": true, 53 "lastInGroup": true,
54 "container": false, 54 "container": false,
@@ -206,7 +206,7 @@ exports.ToolsData = Montage.create(Montage, {
206 "properties": "panProperties", 206 "properties": "panProperties",
207 "spriteSheet": true, 207 "spriteSheet": true,
208 "action": "PanTool", 208 "action": "PanTool",
209 "toolTip": "Pan Tool", 209 "toolTip": "Hand Tool (H)",
210 "cursor": "url('images/tools/hand_down.png'), default", 210 "cursor": "url('images/tools/hand_down.png'), default",
211 "lastInGroup": false, 211 "lastInGroup": false,
212 "container": false, 212 "container": false,
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]});
diff --git a/js/panels/properties/content.reel/content.js b/js/panels/properties/content.reel/content.js
index 3cedee6d..e2ea1374 100644
--- a/js/panels/properties/content.reel/content.js
+++ b/js/panels/properties/content.reel/content.js
@@ -97,8 +97,22 @@ exports.Content = Montage.create(Component, {
97 value: function(event) { 97 value: function(event) {
98// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update 98// console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update
99 if(event.detail.source && event.detail.source !== "pi") { 99 if(event.detail.source && event.detail.source !== "pi") {
100 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "left")); 100 // TODO - This should only update the properties that were changed.
101 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "top")); 101 var el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0];
102 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left"));
103 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top"));
104 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
105 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width"));
106
107 if(this.threeD.inGlobalMode)
108 {
109 this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D");
110 this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D");
111 this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D");
112 this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle");
113 this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle");
114 this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle");
115 }
102 } 116 }
103 } 117 }
104 }, 118 },