Controller for the main map editing window itself. The logic that responds to mouse and keyboard events is all
buried in various ControllerState classes.
public var clipboards:Object
public var cursorsEnabled:Boolean = true
map:Map
[read-only]
Accesses map object.
Implementation
public function get map():Map
public var pen:Class
public var pen_o:Class
public var pen_plus:Class
public var pen_so:Class
public var pen_x:Class
public var state:ControllerState
The current ControllerState
public var tagViewer:TagViewer
public function EditController(map:Map, tagViewer:TagViewer, toolbox:Toolbox)
Constructor function: needs the map information, a panel to edit tags with, and the toolbox to manipulate ways with.
Parameters
public function entityMouseEvent(event:MouseEvent, entity:Entity):void
Parameters
| event:MouseEvent |
|
| entity:Entity |
public function findStateForSelection(sel:Array):ControllerState
Given what is currently selected (or not), find the matching ControllerState.
Parameters
Returns
public function keyDown(key:Number):Boolean
Is the given key currently pressed?
Parameters
Returns
public function setActive():void
public function setCursor(cursor:Class):void
Set a mouse pointer.
Parameters
public function setState(newState:ControllerState):void
Exit the current state and switch to a new one.
Parameters
public function updateSelectionUI(layer:MapPaint = null):void
Updates the various user interfaces that change when the selection changes.
Currently this is the TagViewer and the Toolbox
Parameters
| layer:MapPaint (default = null ) — Optionally pass the layer of the currently selected entity, eg for BugLayers
|
public function updateSelectionUIWithoutTagChange():void
Found an error? Help us fix it. http://wiki.openstreetmap.org/wiki/Potlatch2