API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class DragHandler

Package | org.openscales.core.handler.mouse
Class | public class DragHandler
Inheritance | DragHandler Handler
Subclasses | DragFeatureHandler

DragHandler allows to drag (pan) the map To use this handler, it's necessary to add it to the map. It is a pure ActionScript class. Flex wrapper and components can be found in the openscales-fx module (same name prefixed by Fx).

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | active : Boolean Getter and setter of the boolean defining the activity of the handler | Handler
|  | dragging : Boolean To know if the map is dragging | DragHandler
|  | map : Map Getter and setter of the map associated to the handler | Handler
|  | oncomplete : Function | DragHandler
|  | onstart : Function | DragHandler
|  | toggleHandlerActivity : Function Getter and setter of the callback function used when the handler's activity changes | Handler

Public Methods

| Method | Defined by
--- | --- | ---
|  | DragHandler(map:Map = null, active:Boolean = true) DragHandler constructor | DragHandler

Protected Methods

| Method | Defined by
--- | --- | ---
|  | onMouseDown(event:Event):void The MouseDown Listener | DragHandler
|  | onMouseUp(event:Event):void he MouseUp Listener | DragHandler
|  | registerListeners():void | DragHandler
|  | unregisterListeners():void | DragHandler

Property detail

dragging | property

`dragging:Boolean` [read-write]

To know if the map is dragging

Implementation
`public function get dragging():Boolean`
`public function set dragging(value:Boolean):void`

oncomplete | property |

`oncomplete:Function` [read-write]Implementation
`public function get oncomplete():Function`
`public function set oncomplete(value:Function):void`

onstart | property |

`onstart:Function` [read-write]Implementation
`public function get onstart():Function`
`public function set onstart(value:Function):void`
Constructor detail

DragHandler | () | constructor

`public function DragHandler(map:Map = null, active:Boolean = true)`

DragHandler constructor

Parameters

| `map:Map` (default = `null`)`` — the DragHandler map
| `active:Boolean` (default = `true`)`` — to determinates if the handler is active (default=true)

Method detail

onMouseDown | () | method

`protected function onMouseDown(event:Event):void`

The MouseDown Listener

Parameters

| `event:Event`

onMouseUp | () | method |

`protected function onMouseUp(event:Event):void`

he MouseUp Listener

Parameters

| `event:Event`

registerListeners | () | method |

`protected override function registerListeners():void`

unregisterListeners | () | method |

`protected override function unregisterListeners():void`