Relax the restriction on cross-layer multiselection, for now
[potlatch2.git] / net / systemeD / potlatch2 / controller / DragBackground.as
index 307695df8a0eca7fbe43ea4198b2dcb0351285be..7f46b98e860dc40c0ad9d0c8dafe1a2a2d71f0de 100644 (file)
@@ -3,19 +3,21 @@ package net.systemeD.potlatch2.controller {
     import net.systemeD.potlatch2.EditController;
     import net.systemeD.halcyon.connection.*;
     import net.systemeD.halcyon.MapEvent;
-       import net.systemeD.halcyon.Globals;
 
+    /** The state of realigning the background imagery by holding down a key and moving the mouse. This moves the background, but 
+    * doesn't move the map, thereby adjusting the offset between the background and the map. */
     public class DragBackground extends ControllerState {
 
         private var downX:Number;
         private var downY:Number;
         
+        /** Start the drag by recording the location of the mouse. */
         public function DragBackground(event:MouseEvent) {
-                       trace ("starting DragBackground");
             downX = event.localX;
             downY = event.localY;
         }
  
+       /** Respond to dragging and end drag. */
        override public function processMouseEvent(event:MouseEvent, entity:Entity):ControllerState {
 
             if (event.type==MouseEvent.MOUSE_UP) {
@@ -34,14 +36,17 @@ package net.systemeD.potlatch2.controller {
                        }
         }
 
+        /** Prevent map panning while background is being dragged. */
         override public function enterState():void {
                        controller.map.draggable=false;
-                       Globals.vars.root.addDebug("**** -> "+this);
         }
+        
+        /** Re-allow map panning. */
         override public function exitState(newState:ControllerState):void {
                        controller.map.draggable=true;
-                       Globals.vars.root.addDebug("**** <- "+this);
         }
+        
+        /** "DragBackground" */
         override public function toString():String {
             return "DragBackground";
         }