From fb02c657db5b763d471a4b09fd5929198da60c4f Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 1 Mar 2012 16:54:27 -0800 Subject: revert removing the webkit transform from elements. Signed-off-by: Valerio Virgillito --- js/mediators/element-mediator.js | 9 ++++----- js/tools/TagTool.js | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'js') diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 60a75992..127f73e1 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js @@ -90,11 +90,10 @@ exports.ElementMediator = Montage.create(NJComponent, { _addElement: { value: function(el, rules, noEvent) { ElementController.addElement(el, rules); - // Commenting this out because we should not add 3D properties by default when creating new elements. -// var p3d = this.get3DProperties(el); -// if(p3d) { -// el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); -// } + var p3d = this.get3DProperties(el); + if(p3d) { + el.elementModel.controller["set3DProperties"](el, [p3d], 0, true); + } if(!noEvent) { this.application.ninja.documentController.activeDocument.needsSave = true; NJevent("elementAdded", el); diff --git a/js/tools/TagTool.js b/js/tools/TagTool.js index 39667aa7..db6e5834 100755 --- a/js/tools/TagTool.js +++ b/js/tools/TagTool.js @@ -233,8 +233,8 @@ exports.TagTool = Montage.create(DrawingTool, { 'position': 'absolute', 'top' : top + 'px', 'left' : left + 'px' -// '-webkit-transform-style' : 'preserve-3d', -// '-webkit-transform' : matStr + '-webkit-transform-style' : 'preserve-3d', + '-webkit-transform' : matStr }; // TODO - for canvas, set both as style and attribute. @@ -254,8 +254,8 @@ exports.TagTool = Montage.create(DrawingTool, { makeStaticElement: { value: function(tag) { var styles = { -// "-webkit-transform-style": "preserve-3d", -// "-webkit-transform": "perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)" + "-webkit-transform-style": "preserve-3d", + "-webkit-transform": "perspective(1400) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)" }; tag.innerHTML = "content"; -- cgit v1.2.3