Dispatch events when the nodes are added or removed from the dupes list. Doesn't...
[potlatch2.git] / net / systemeD / halcyon / NodeUI.as
index bf4f631fabd15d7d1a54c391bc722170ee4a32fd..624a567fea50135344695bf7de7ef0310e3fb35d 100644 (file)
@@ -30,6 +30,7 @@ package net.systemeD.halcyon {
                                }
                        }
                        entity.addEventListener(Connection.NODE_MOVED, nodeMoved);
+            entity.addEventListener(Connection.NODE_ALTERED, nodeAltered);
             attachRelationListeners();
                        redraw();
                }
@@ -37,12 +38,17 @@ package net.systemeD.halcyon {
                public function removeEventListeners():void {
                        removeGenericEventListeners();
                        entity.removeEventListener(Connection.NODE_MOVED, nodeMoved);
+            entity.removeEventListener(Connection.NODE_ALTERED, nodeAltered);
                }
 
                public function nodeMoved(event:Event):void {
                    updatePosition();
                }
 
+        private function nodeAltered(event:Event):void {
+            redraw();
+        }
+
                override public function doRedraw():Boolean {
                        if (!paint.ready) { return false; }
                        if (entity.deleted) { return false; }