drag ways (still needs undo though)
[potlatch2.git] / net / systemeD / halcyon / WayUI.as
index 94a52df231869e237c546415d6f0d16d24e18b22..e8bcb5afcafdc7d879303020271b56c64dcf0acd 100755 (executable)
@@ -36,6 +36,7 @@ package net.systemeD.halcyon {
             way.addEventListener(Connection.WAY_NODE_REMOVED, wayNodeRemoved);
             way.addEventListener(Connection.WAY_REORDERED, wayReordered);
                        way.addEventListener(Connection.WAY_DELETED, wayDeleted);
+            way.addEventListener(Connection.WAY_DRAGGED, wayDragged);
                        way.addEventListener(Connection.ADDED_TO_RELATION, wayRelationAdded);
                        way.addEventListener(Connection.REMOVED_FROM_RELATION, wayRelationRemoved);
                        way.addEventListener(Connection.SUSPEND_REDRAW, suspendRedraw);
@@ -92,10 +93,12 @@ package net.systemeD.halcyon {
                private function wayDeleted(event:EntityEvent):void {
                        redraw();
                }
-        
         private function wayReordered(event:EntityEvent):void {
             redraw();
         }
+               private function wayDragged(event:WayDraggedEvent):void {
+                       offsetSprites(event.xDelta,event.yDelta);
+               }
 
                private function init():void {
                        recalculate();