aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-19 00:45:26 -0700
committerArmen Kesablyan2012-06-19 00:45:26 -0700
commitc59eb371559a3061ce53223e249ca97daace5968 (patch)
treef9540e26c0f273d35f92010605da65dd85bbe70c /js/controllers/elements
parent0f040acabfb7a4bf3138debec5aff869487ceb11 (diff)
parent918a4f5870e972b6e4e301c3237e065a1ffd26f5 (diff)
downloadninja-c59eb371559a3061ce53223e249ca97daace5968.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-xjs/controllers/elements/body-controller.js5
-rwxr-xr-xjs/controllers/elements/element-controller.js4
2 files changed, 5 insertions, 4 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js
index 0dc11b82..0ca6c417 100755
--- a/js/controllers/elements/body-controller.js
+++ b/js/controllers/elements/body-controller.js
@@ -13,7 +13,8 @@ exports.BodyController = Montage.create(ElementController, {
13 set3DProperties: { 13 set3DProperties: {
14 value: function(el, props, update3DModel) { 14 value: function(el, props, update3DModel) {
15 var dist = props["dist"], mat = props["mat"]; 15 var dist = props["dist"], mat = props["mat"];
16 this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); 16// this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")");
17 el.style["-webkit-transform"] = "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")";
17 18
18 el.elementModel.props3D.matrix3d = mat; 19 el.elementModel.props3D.matrix3d = mat;
19 el.elementModel.props3D.perspectiveDist = dist; 20 el.elementModel.props3D.perspectiveDist = dist;
@@ -37,7 +38,7 @@ exports.BodyController = Montage.create(ElementController, {
37 case "height": 38 case "height":
38 case "width": 39 case "width":
39 case "-webkit-transform-style": 40 case "-webkit-transform-style":
40 return this.application.ninja.stylesController.getElementStyle(el, p, true, true); 41 return this.application.ninja.stylesController.getElementStyle(el, p);
41 default: 42 default:
42 return ElementController.getProperty(el, p, true, true); 43 return ElementController.getProperty(el, p, true, true);
43 //console.log("Undefined Stage property ", p); 44 //console.log("Undefined Stage property ", p);
diff --git a/js/controllers/elements/element-controller.js b/js/controllers/elements/element-controller.js
index 4a02e9a3..e40a646a 100755
--- a/js/controllers/elements/element-controller.js
+++ b/js/controllers/elements/element-controller.js
@@ -19,13 +19,13 @@ exports.ElementController = Montage.create(Component, {
19 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID); 19 var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID);
20 20
21 if(selectedLayerIndex === 0) { 21 if(selectedLayerIndex === 0) {
22 this.application.ninja.currentSelectedContainer.appendChild(el); 22 this.application.ninja.currentDocument.model.domContainer.appendChild(el);
23 } else { 23 } else {
24 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; 24 var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0];
25 element.parentNode.insertBefore(el, element.nextSibling); 25 element.parentNode.insertBefore(el, element.nextSibling);
26 } 26 }
27 } else { 27 } else {
28 this.application.ninja.currentSelectedContainer.appendChild(el); 28 this.application.ninja.currentDocument.model.domContainer.appendChild(el);
29 } 29 }
30 30
31 if(styles) { 31 if(styles) {