From 52fac825174d16e3ff6875fc497d3f3cfaf4812c Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 21 Mar 2012 12:02:36 -0700 Subject: Get matrix and perspective distance from styles controller. Signed-off-by: Nivesh Rajbhandari --- js/lib/NJUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 4f1082f9..f611052b 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -94,7 +94,7 @@ exports.NJUtils = Object.create(Object.prototype, { ///// TODO: find a different place for this function makeElementModel: { value: function(el, selection, controller, isShape) { - var p3d = Montage.create(Properties3D).init(el); + var p3d = Montage.create(Properties3D).init(el, (selection === "Stage")); var shapeProps = null; if(isShape) { shapeProps = Montage.create(ShapeModel); -- cgit v1.2.3 From 3987b73569e58843f2a91c0c6c4e4132f51ac247 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Wed, 21 Mar 2012 17:13:56 -0700 Subject: Do not set webkit-transform styles on elements unless 3d is used on them. Signed-off-by: Nivesh Rajbhandari --- js/lib/NJUtils.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index f611052b..cb877591 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -94,7 +94,10 @@ exports.NJUtils = Object.create(Object.prototype, { ///// TODO: find a different place for this function makeElementModel: { value: function(el, selection, controller, isShape) { - var p3d = Montage.create(Properties3D).init(el, (selection === "Stage")); + var p3d = Montage.create(Properties3D); + if(selection === "Stage") { + p3d.init(el, true); + } var shapeProps = null; if(isShape) { shapeProps = Montage.create(ShapeModel); -- cgit v1.2.3 From 62438ba52de51bb8ae20de07ec2f4dad55b9a929 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 27 Mar 2012 10:32:26 -0700 Subject: Build elements' properties3d values on file open. Signed-off-by: Nivesh Rajbhandari --- js/lib/NJUtils.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 0457120b..c01d865b 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -182,6 +182,9 @@ exports.NJUtils = Object.create(Object.prototype, { break; } this.makeElementModel(el, selection, controller, isShape); + if(el.elementModel && el.elementModel.props3D) { + el.elementModel.props3D.init(el, (selection === "Stage")); + } } }, -- cgit v1.2.3 From 3f30c5ae31f0079162befc1eec6241141cbc79ce Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Mon, 2 Apr 2012 14:58:56 -0700 Subject: IKNinja-1399 - [Eyedropper] Not sampling WebGL gradients after file open. Need to set the isShape property in the elementModel on file open. Signed-off-by: Nivesh Rajbhandari --- js/lib/NJUtils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js/lib/NJUtils.js') diff --git a/js/lib/NJUtils.js b/js/lib/NJUtils.js index 904aa41e..18796da0 100755 --- a/js/lib/NJUtils.js +++ b/js/lib/NJUtils.js @@ -136,7 +136,8 @@ exports.NJUtils = Object.create(Object.prototype, { controller: { value: ControllerFactory.getController(controller)}, pi: { value: pi}, props3D: { value: p3d}, - shapeModel: { value: shapeProps} + shapeModel: { value: shapeProps}, + isShape: { value: isShape} }); } @@ -168,6 +169,7 @@ exports.NJUtils = Object.create(Object.prototype, { // TODO - Need more info about the shape selection = "canvas"; controller = "shape"; + isShape = true; } else { -- cgit v1.2.3