aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/element-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/element-controller.js')
-rw-r--r--js/controllers/elements/element-controller.js61
1 files changed, 30 insertions, 31 deletions
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 9b13e703..65d26bdd 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -204,36 +204,35 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
204 } 204 }
205 else 205 else
206 { 206 {
207 // TODO - for now, just return the identity matrix 207 var mat;
208 return Matrix.I(4); 208
209// var mat; 209 if (el)
210// 210 {
211// if (elt) 211 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform");
212// { 212 if (xformStr)
213// var xformStr = ElementsMediator.getProperty(elt, "-webkit-transform"); 213 mat = this.transformStringToMat( xformStr );
214// if (xformStr) 214 if (!mat)
215// mat = this.transformStringToMat( xformStr ); 215 mat = Matrix.I(4);
216// if (!mat) 216
217// mat = Matrix.I(4); 217 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
218// 218 if (zoom)
219// if (elt.style && elt.style.zoom) 219 {
220// { 220 zoom = Number(zoom);
221// var zoom = Number(elt.style.zoom); 221 if (zoom != 1)
222// if (zoom != 1) 222 {
223// { 223 var zoomMat = Matrix.create( [
224// var zoomMat = Matrix.create( [ 224 [ zoom, 0, 0, 0],
225// [ zoom, 0, 0, 0], 225 [ 0, zoom, 0, 0],
226// [ 0, zoom, 0, 0], 226 [ 0, 0, zoom, 0],
227// [ 0, 0, zoom, 0], 227 [ 0, 0, 0, 1]
228// [ 0, 0, 0, 1] 228 ] );
229// ] ); 229 glmat4.multiply( zoomMat, mat, mat );
230// glmat4.multiply( zoomMat, mat, mat ); 230 }
231// } 231 }
232// } 232 }
233// } 233
234// 234 el.elementModel.props3D.matrix3d = mat;
235// elt.elementModel.props3D.matrix3d = mat; 235 return mat;
236// return mat;
237 } 236 }
238 } 237 }
239 }, 238 },
@@ -284,7 +283,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
284 el.elementModel.props3D.matrix3d = mat; 283 el.elementModel.props3D.matrix3d = mat;
285 el.elementModel.props3D.perspectiveDist = dist; 284 el.elementModel.props3D.perspectiveDist = dist;
286 285
287// if(update3DModel) 286 if(update3DModel)
288 { 287 {
289 this._update3DProperties(el, mat, dist); 288 this._update3DProperties(el, mat, dist);
290 } 289 }