aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-07-20 11:54:04 -0700
committerNivesh Rajbhandari2012-07-20 11:54:04 -0700
commitd7f5d6ffb39d55f2d4f4f366421571826df1e8bb (patch)
tree6123268c587f796f27d389e17099139893c88587 /js
parent4648e2eda9aa8c8f9b0aed4d12fef8b1d00f1769 (diff)
downloadninja-d7f5d6ffb39d55f2d4f4f366421571826df1e8bb.tar.gz
If no material was defined, use Flat material when switching from 2d to WebGL shape.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 1d945066..6dabff47 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -841,10 +841,10 @@ exports.ShapesController = Montage.create(CanvasController, {
841 child.strokeMat = "Linear Gradient"; 841 child.strokeMat = "Linear Gradient";
842 } 842 }
843 } 843 }
844 else if( (child.strokeMat === "Radial Gradient") || 844 else if( !child.strokeMat || (child.strokeMat === "Radial Gradient") ||
845 (child.strokeMat === "Linear Gradient") ) 845 (child.strokeMat === "Linear Gradient") )
846 { 846 {
847 // Set Flat Material for children geometry if color has been changed to solid 847 // Set Flat Material for children geometry if no material defined or color has been changed to solid
848 child.strokeMat = "Flat"; 848 child.strokeMat = "Flat";
849 } 849 }
850 } 850 }
@@ -863,10 +863,10 @@ exports.ShapesController = Montage.create(CanvasController, {
863 child.fillMat = "Linear Gradient"; 863 child.fillMat = "Linear Gradient";
864 } 864 }
865 } 865 }
866 else if( (child.fillMat === "Radial Gradient") || 866 else if( !child.fillMat || (child.fillMat === "Radial Gradient") ||
867 (child.fillMat === "Linear Gradient") ) 867 (child.fillMat === "Linear Gradient") )
868 { 868 {
869 // Set Flat Material for children geometry if color has been changed to solid 869 // Set Flat Material for children geometry if no material defined or color has been changed to solid
870 child.fillMat = "Flat"; 870 child.fillMat = "Flat";
871 } 871 }
872 } 872 }