You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2010/06/18 19:29:46 UTC

svn commit: r956055 - /incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js

Author: zoe
Date: Fri Jun 18 17:29:46 2010
New Revision: 956055

URL: http://svn.apache.org/viewvc?rev=956055&view=rev
Log:
ARIES-319 Modifying order in removeSelf() so that we do a bit less work

Modified:
    incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js

Modified: incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js?rev=956055&r1=956054&r2=956055&view=diff
==============================================================================
--- incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js (original)
+++ incubator/aries/trunk/samples/goat/goat-web/src/main/resources/web/goat/Component.js Fri Jun 18 17:29:46 2010
@@ -163,13 +163,8 @@ updateProperties : function(props) {
 	// console.log("Properties processed.");
 },
 removeSelf : function() {
-	//Remove this component and all the relationship elements attached to it.
-	//This one is subscribed to by RelationshipElement
-	dojo.publish("goat.component.delete." + this.id, [ this ]);
-
-	//This one is subscribed to by ComponentStatusGrid
-	dojo.publish("goat.component.delete", [ this ]);
 
+	//Remove this component and all the relationship elements attached to it.
 	this.surface.remove(this.group);
 	//Now we remove all other the elements
 	for (var type in this.elements) {
@@ -178,6 +173,12 @@ removeSelf : function() {
 	}
 	this.relationshipManager.removeSelf();
 	delete this.RelationshipManager;
+
+	//This one is subscribed to by RelationshipElement
+	dojo.publish("goat.component.delete." + this.id, [ this ]);
+
+	//This one is subscribed to by ComponentStatusGrid
+	dojo.publish("goat.component.delete", [ this ]);
 },
 initGfx : function() {
 	this.group = this.surface.createGroup();