aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/controllers/elements/element-controller.js2
-rw-r--r--js/panels/properties/sections/three-d-view.reel/three-d-view.html12
-rw-r--r--js/panels/properties/sections/three-d-view.reel/three-d-view.js27
3 files changed, 32 insertions, 9 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 30469db0..f2b54014 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -206,7 +206,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
206 el.elementModel.props3D.matrix3d = mat; 206 el.elementModel.props3D.matrix3d = mat;
207 el.elementModel.props3D.perspectiveDist = dist; 207 el.elementModel.props3D.perspectiveDist = dist;
208 208
209// if(update3DModel) 209 if(update3DModel)
210 { 210 {
211 this._update3DProperties(el, mat, dist); 211 this._update3DProperties(el, mat, dist);
212 } 212 }
diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.html b/js/panels/properties/sections/three-d-view.reel/three-d-view.html
index 1e24cb55..11a5b3f2 100644
--- a/js/panels/properties/sections/three-d-view.reel/three-d-view.html
+++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.html
@@ -39,7 +39,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
39 "value": { 39 "value": {
40 "boundObject": {"@": "owner"}, 40 "boundObject": {"@": "owner"},
41 "boundObjectPropertyPath": "x3D", 41 "boundObjectPropertyPath": "x3D",
42 "oneway": false 42 "oneway": true
43 } 43 }
44 }, 44 },
45 "listeners": [ 45 "listeners": [
@@ -68,7 +68,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
68 "value": { 68 "value": {
69 "boundObject": {"@": "owner"}, 69 "boundObject": {"@": "owner"},
70 "boundObjectPropertyPath": "y3D", 70 "boundObjectPropertyPath": "y3D",
71 "oneway": false 71 "oneway": true
72 } 72 }
73 }, 73 },
74 "listeners": [ 74 "listeners": [
@@ -97,7 +97,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
97 "value": { 97 "value": {
98 "boundObject": {"@": "owner"}, 98 "boundObject": {"@": "owner"},
99 "boundObjectPropertyPath": "z3D", 99 "boundObjectPropertyPath": "z3D",
100 "oneway": false 100 "oneway": true
101 } 101 }
102 }, 102 },
103 "listeners": [ 103 "listeners": [
@@ -128,7 +128,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
128 "value": { 128 "value": {
129 "boundObject": {"@": "owner"}, 129 "boundObject": {"@": "owner"},
130 "boundObjectPropertyPath": "xAngle", 130 "boundObjectPropertyPath": "xAngle",
131 "oneway": false 131 "oneway": true
132 } 132 }
133 }, 133 },
134 "listeners": [ 134 "listeners": [
@@ -159,7 +159,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
159 "value": { 159 "value": {
160 "boundObject": {"@": "owner"}, 160 "boundObject": {"@": "owner"},
161 "boundObjectPropertyPath": "yAngle", 161 "boundObjectPropertyPath": "yAngle",
162 "oneway": false 162 "oneway": true
163 } 163 }
164 }, 164 },
165 "listeners": [ 165 "listeners": [
@@ -190,7 +190,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
190 "value": { 190 "value": {
191 "boundObject": {"@": "owner"}, 191 "boundObject": {"@": "owner"},
192 "boundObjectPropertyPath": "zAngle", 192 "boundObjectPropertyPath": "zAngle",
193 "oneway": false 193 "oneway": true
194 } 194 }
195 }, 195 },
196 "listeners": [ 196 "listeners": [
diff --git a/js/panels/properties/sections/three-d-view.reel/three-d-view.js b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
index dda9f993..96053490 100644
--- a/js/panels/properties/sections/three-d-view.reel/three-d-view.js
+++ b/js/panels/properties/sections/three-d-view.reel/three-d-view.js
@@ -99,6 +99,14 @@ exports.ThreeD = Montage.create(Component, {
99 value: null 99 value: null
100 }, 100 },
101 101
102 _curMat: {
103 value: null
104 },
105
106 _curProp: {
107 value: null
108 },
109
102 handleChange: { 110 handleChange: {
103 value: function(event) { 111 value: function(event) {
104 if(event.wasSetByCode) { 112 if(event.wasSetByCode) {
@@ -110,6 +118,9 @@ exports.ThreeD = Montage.create(Component, {
110 this.item, 118 this.item,
111 this.inGlobalMode, 119 this.inGlobalMode,
112 false); 120 false);
121
122 this._curMat = null;
123 this._curProp = null;
113 } 124 }
114 }, 125 },
115 126
@@ -129,8 +140,20 @@ exports.ThreeD = Montage.create(Component, {
129 140
130 apply3DProperties : { 141 apply3DProperties : {
131 value : function(prop, value, item, inGlobalMode, isChanging){ 142 value : function(prop, value, item, inGlobalMode, isChanging){
132 var curMat = this.application.ninja.elementMediator.getMatrix(item); 143 if(!this._curMat)
133 var delta = value.value - this.application.ninja.elementMediator.get3DProperty(item, prop); 144 {
145 this._curMat = this.application.ninja.elementMediator.getMatrix(item);
146 }
147 var curMat = this._curMat;
148 var delta = value.value;
149 if(inGlobalMode)
150 {
151 if(!this._curProp)
152 {
153 this._curProp = this.application.ninja.elementMediator.get3DProperty(item, prop);
154 }
155 delta -= this._curProp;
156 }
134 157
135 var xFormMat = Matrix.I(4); 158 var xFormMat = Matrix.I(4);
136 switch (prop) 159 switch (prop)