aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements')
-rw-r--r--js/controllers/elements/canvas-controller.js14
-rw-r--r--js/controllers/elements/element-controller.js61
2 files changed, 37 insertions, 38 deletions
diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js
index 21de9879..b5df3911 100644
--- a/js/controllers/elements/canvas-controller.js
+++ b/js/controllers/elements/canvas-controller.js
@@ -34,12 +34,12 @@ exports.CanvasController = Montage.create(ElementController, {
34 } 34 }
35 } 35 }
36 }, 36 },
37 37
38 setProperties: { 38 setProperties: {
39 value: function(el, props, index) { 39 value: function(el, props, index) {
40 for(var p in props) { 40 for(var p in props) {
41 el.elementModel.controller.setProperty(el, p, props[p][index]); 41 el.elementModel.controller.setProperty(el, p, props[p][index]);
42 } 42 }
43 } 43 }
44 } 44 }
45}); \ No newline at end of file 45}); \ No newline at end of file
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 892ac2f2..65c24b46 100644
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -211,36 +211,35 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
211 } 211 }
212 else 212 else
213 { 213 {
214 // TODO - for now, just return the identity matrix 214 var mat;
215 return Matrix.I(4); 215
216// var mat; 216 if (el)
217// 217 {
218// if (elt) 218 var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform");
219// { 219 if (xformStr)
220// var xformStr = ElementsMediator.getProperty(elt, "-webkit-transform"); 220 mat = this.transformStringToMat( xformStr );
221// if (xformStr) 221 if (!mat)
222// mat = this.transformStringToMat( xformStr ); 222 mat = Matrix.I(4);
223// if (!mat) 223
224// mat = Matrix.I(4); 224 var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom");
225// 225 if (zoom)
226// if (elt.style && elt.style.zoom) 226 {
227// { 227 zoom = Number(zoom);
228// var zoom = Number(elt.style.zoom); 228 if (zoom != 1)
229// if (zoom != 1) 229 {
230// { 230 var zoomMat = Matrix.create( [
231// var zoomMat = Matrix.create( [ 231 [ zoom, 0, 0, 0],
232// [ zoom, 0, 0, 0], 232 [ 0, zoom, 0, 0],
233// [ 0, zoom, 0, 0], 233 [ 0, 0, zoom, 0],
234// [ 0, 0, zoom, 0], 234 [ 0, 0, 0, 1]
235// [ 0, 0, 0, 1] 235 ] );
236// ] ); 236 glmat4.multiply( zoomMat, mat, mat );
237// glmat4.multiply( zoomMat, mat, mat ); 237 }
238// } 238 }
239// } 239 }
240// } 240
241// 241 el.elementModel.props3D.matrix3d = mat;
242// elt.elementModel.props3D.matrix3d = mat; 242 return mat;
243// return mat;
244 } 243 }
245 } 244 }
246 }, 245 },
@@ -291,7 +290,7 @@ var ElementController = exports.ElementController = Montage.create(NJComponent,
291 el.elementModel.props3D.matrix3d = mat; 290 el.elementModel.props3D.matrix3d = mat;
292 el.elementModel.props3D.perspectiveDist = dist; 291 el.elementModel.props3D.perspectiveDist = dist;
293 292
294// if(update3DModel) 293 if(update3DModel)
295 { 294 {
296 this._update3DProperties(el, mat, dist); 295 this._update3DProperties(el, mat, dist);
297 } 296 }