From 5b4f6b1618cf571a6bce5a631f976a008e04a64e Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Thu, 29 Mar 2012 15:52:08 -0700
Subject: Updated shapes to always check for its stroke and fill colors and
 materials instead of relying on the shapeModel cache because it can get out
 of sync.

Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
---
 js/document/html-document.js | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

(limited to 'js/document/html-document.js')

diff --git a/js/document/html-document.js b/js/document/html-document.js
index 8f9d2870..6ca9eaa3 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -307,19 +307,15 @@ exports.HTMLDocument = Montage.create(TextDocument, {
 			{
 				shapeModel.GLGeomObj			= root;
 				shapeModel.strokeSize			= root._strokeWidth;
-				shapeModel.stroke				= root._strokeColor.slice();
-				shapeModel.strokeMaterial		= root._strikeMaterial ? root._strokeMaterial.dup() : null;
+				shapeModel.stroke				= root._strokeColor;
 				shapeModel.strokeStyle			= "solid";
 				//shapeModel.strokeStyleIndex
-				//shapeModel.border
-				//shapeModel.background
 				switch (root.geomType())
 				{
 					case root.GEOM_TYPE_RECTANGLE:
                         elementModel.selection = "Rectangle";
                         elementModel.pi = "RectanglePi";
-                        shapeModel.fill					= root._fillColor.slice();
-                        shapeModel.fillMaterial			= root._fillMaterial ? root._fillMaterial.dup() : null;
+                        shapeModel.fill					= root._fillColor;
 						shapeModel.tlRadius = root._tlRadius;
 						shapeModel.trRadius = root._trRadius;
 						shapeModel.blRadius = root._blRadius;
@@ -329,8 +325,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
 					case root.GEOM_TYPE_CIRCLE:
                         elementModel.selection = "Oval";
                         elementModel.pi = "OvalPi";
-                        shapeModel.fill					= root._fillColor.slice();
-                        shapeModel.fillMaterial			= root._fillMaterial ? root._fillMaterial.dup() : null;
+                        shapeModel.fill					= root._fillColor;
 						shapeModel.innerRadius = root._innerRadius;
 						break;
 
-- 
cgit v1.2.3


From 4dc89306c43e86cdac254c81fb9bb3a92eb4a8b9 Mon Sep 17 00:00:00 2001
From: Nivesh Rajbhandari
Date: Thu, 5 Apr 2012 12:12:36 -0700
Subject: Removing fill, stroke, fillMaterial and strokeMaterial from the
 shapeModel cache because they can easily get out of sync with the actual
 colors and materials.  Instead, we will always query the object for these
 values.

Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
---
 js/document/html-document.js | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'js/document/html-document.js')

diff --git a/js/document/html-document.js b/js/document/html-document.js
index 6324d5ed..2531465d 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -300,7 +300,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
 			{
 				shapeModel.GLGeomObj			= root;
 				shapeModel.strokeSize			= root._strokeWidth;
-				shapeModel.stroke				= root._strokeColor;
 				shapeModel.strokeStyle			= "solid";
 				//shapeModel.strokeStyleIndex
 				switch (root.geomType())
@@ -308,7 +307,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
 					case root.GEOM_TYPE_RECTANGLE:
                         elementModel.selection = "Rectangle";
                         elementModel.pi = "RectanglePi";
-                        shapeModel.fill					= root._fillColor;
 						shapeModel.tlRadius = root._tlRadius;
 						shapeModel.trRadius = root._trRadius;
 						shapeModel.blRadius = root._blRadius;
@@ -318,7 +316,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
 					case root.GEOM_TYPE_CIRCLE:
                         elementModel.selection = "Oval";
                         elementModel.pi = "OvalPi";
-                        shapeModel.fill					= root._fillColor;
 						shapeModel.innerRadius = root._innerRadius;
 						break;
 
-- 
cgit v1.2.3