From 806974142d44afdd23534bf2d18eff0a8e701e0c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Fri, 8 Jun 2012 16:59:59 -0700 Subject: rewrite: currentSelectedContainer -> domContainer Fixed the currentSelectedContainer by removing bindings and using property change on the current document added the red outline back. Signed-off-by: Valerio Virgillito --- js/controllers/elements/element-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/controllers/elements') 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, { var selectedLayerIndex = this.application.ninja.timeline.getLayerIndexByID(this.application.ninja.timeline.currentLayerSelected.layerData.layerID); if(selectedLayerIndex === 0) { - this.application.ninja.currentSelectedContainer.appendChild(el); + this.application.ninja.currentDocument.model.domContainer.appendChild(el); } else { var element = this.application.ninja.timeline.arrLayers[selectedLayerIndex].layerData.elementsList[0]; element.parentNode.insertBefore(el, element.nextSibling); } } else { - this.application.ninja.currentSelectedContainer.appendChild(el); + this.application.ninja.currentDocument.model.domContainer.appendChild(el); } if(styles) { -- cgit v1.2.3 From 509092ff335f74517a413cfb2deeb9d2de20f8e3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 12 Jun 2012 15:13:09 -0700 Subject: Fixing properties panel to support px and % for body and other elements. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 0dc11b82..27989c65 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -37,7 +37,7 @@ exports.BodyController = Montage.create(ElementController, { case "height": case "width": case "-webkit-transform-style": - return this.application.ninja.stylesController.getElementStyle(el, p, true, true); + return this.application.ninja.stylesController.getElementStyle(el, p); default: return ElementController.getProperty(el, p, true, true); //console.log("Undefined Stage property ", p); -- cgit v1.2.3 From 9185145b3ab37070c7f32befaec1ab38486745b3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 14 Jun 2012 16:00:53 -0700 Subject: Save user's html and body styles and inline body styles for 3d so they don't get saved out with the document. This still requires some changes by Jose. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 27989c65..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, { set3DProperties: { value: function(el, props, update3DModel) { var dist = props["dist"], mat = props["mat"]; - this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); +// this.application.ninja.stylesController.setElementStyle(el, "-webkit-transform", "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"); + el.style["-webkit-transform"] = "perspective(" + dist + ") " + "matrix3d(" + MathUtils.scientificToDecimal(mat, 5) + ")"; el.elementModel.props3D.matrix3d = mat; el.elementModel.props3D.perspectiveDist = dist; -- cgit v1.2.3