aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties/sections/three-d-view.reel/three-d-view.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties/sections/three-d-view.reel/three-d-view.js')
-rw-r--r--js/panels/properties/sections/three-d-view.reel/three-d-view.js27
1 files changed, 25 insertions, 2 deletions
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)