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

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

DragFeature is use to drag a feature To use this handler, it's necessary to add it to the map It dispatch FeatureEvent.FEATURE_DRAG_START and FeatureEvent.FEATURE_DRAG_STOP events

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
--- | --- | ---
|  | DragFeatureHandler(map:Map = null, active:Boolean = false) Constructor class | DragFeatureHandler
|  | addDraggableLayer(layer:FeatureLayer):void This function add a layers as draggabble layer | DragFeatureHandler
|  | addDraggableLayers(layers:Array):void This function add an array of layers as draggabble layer | DragFeatureHandler
|  | addUndraggableFeature(feature:Feature):void This function is used to add an undraggable feature which belong to a draggable layer | DragFeatureHandler
|  | addUndraggableFeatures(features:Array):void This function is used to add an array of undraggable feature which belong to a draggable layer | DragFeatureHandler

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | onMouseDown(event:Event):void This function is launched when the Mouse is down | DragFeatureHandler
|  | onMouseUp(event:Event):void This function is launched when the Mouse is up | DragFeatureHandler
|  | registerListeners():void | DragHandler
|  | unregisterListeners():void | DragHandler

Constructor detail

DragFeatureHandler | () | constructor

`public function DragFeatureHandler(map:Map = null, active:Boolean = false)`

Constructor class

Parameters

| `map:Map` (default = `null`)`` — Object
| `active:Boolean` (default = `false`)`` — to active or deactivate the handler

Method detail

addDraggableLayer | () | method

`public function addDraggableLayer(layer:FeatureLayer):void`

This function add a layers as draggabble layer

Parameters

| `layer:FeatureLayer` — the layer to add

addDraggableLayers | () | method |

`public function addDraggableLayers(layers:Array):void`

This function add an array of layers as draggabble layer

Parameters

| `layers:Array` — Array of layer to add

addUndraggableFeature | () | method |

`public function addUndraggableFeature(feature:Feature):void`

This function is used to add an undraggable feature which belong to a draggable layer

Parameters

| `feature:Feature` — The feature to add

addUndraggableFeatures | () | method |

`public function addUndraggableFeatures(features:Array):void`

This function is used to add an array of undraggable feature which belong to a draggable layer

Parameters

| `features:Array` — Array of feature to make undraggable

onMouseDown | () | method |

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

This function is launched when the Mouse is down

Parameters

| `event:Event`

onMouseUp | () | method |

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

This function is launched when the Mouse is up

Parameters

| `event:Event`