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

Package | org.openscales.core.handler.feature.draw
Class | public class EditPolygonHandler
Inheritance | EditPolygonHandler AbstractEditCollectionHandler AbstractEditHandler Handler

This Handler is used for polygon edition its extends CollectionHandler

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | active : Boolean inheritDoc | AbstractEditHandler
|  | detectionTolerance : Number Tolerance used for detecting point | AbstractEditCollectionHandler
|  | featureClickHandler : FeatureClickHandler Use this function only this when you want to use the handler alone if you want to modify at the same time different type of geometries use the LayerEditionHandler | AbstractEditHandler
|  | layerToEdit : FeatureLayer | AbstractEditHandler
|  | map : Map Map Settings | AbstractEditHandler
|  | _pointUnderTheMouse : PointFeature = null [static] This singleton represents the point under the mouse during the dragging operation | AbstractEditCollectionHandler
|  | toggleHandlerActivity : Function Getter and setter of the callback function used when the handler's activity changes | Handler

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined by
--- | --- | ---
|  | _drawContainer : Sprite = null This sprite is used to draw temporaries features during dragging | AbstractEditHandler
|  | _featureClickHandler : FeatureClickHandler = null his handler is used for differenciation of mouse actions(drag drop clikc double click) during the edition . | AbstractEditHandler
|  | _featureCurrentlyDrag : Feature = null The feature currently dragged | AbstractEditHandler
|  | indexOfFeatureCurrentlyDrag : int = -1 index of the feature currently drag in the geometry collection | AbstractEditCollectionHandler
|  | _isUsedAlone : Boolean = true To specify that the edition Handler is used alone(PathHandler || PointHandler etc) or associated with other handlers in LayerEditionHandler | AbstractEditHandler
|  | _layerToEdit : FeatureLayer = null the layer concerned by the edition | AbstractEditHandler

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | EditPolygonHandler(map:Map = null, active:Boolean = false, layerToEdit:FeatureLayer = null, featureClickHandler:FeatureClickHandler = null, drawContainer:Sprite = null, isUsedAlone:Boolean = true) | EditPolygonHandler
|  | createPointUndertheMouse(evt:FeatureEvent):void Create a virtual vertice under the mouse | AbstractEditCollectionHandler
|  | dragVerticeStart(vectorfeature:PointFeature):void This function is launched when you are dragging a vertice(Virtual or not) | EditPolygonHandler
|  | dragVerticeStop(vectorfeature:PointFeature):void This function is launched when you stop dragging a vertice(Virtual or not) | EditPolygonHandler
|  | editionModeStart():Boolean This function is used for Polygons edition mode starting | EditPolygonHandler
|  | editionModeStop():Boolean Stop the edition Mode | AbstractEditCollectionHandler
|  | featureClick(event:FeatureEvent):void This function is launched when you click on a vertice(Virtual or not) for the moment nothing is done | AbstractEditCollectionHandler
|  | featureDoubleClick(event:FeatureEvent):void This function is launched when you double click on a vertice(Virtual or not) For the moment the vertice is deleted | AbstractEditCollectionHandler
|  | onFeatureOut(evt:FeatureEvent):void This function is used to manage the mouse when the mouse is out of the feature | AbstractEditCollectionHandler
|  | refreshEditedfeatures(event:MapEvent = null):void This function is used to start the edition of all vector features in a layer only use by LayerEditionHandler | AbstractEditHandler

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | drawTemporaryFeature(event:MouseEvent):void To draw the temporaries feature during drag Operation | EditPolygonHandler
|  | registerListeners():void Add the listeners to the associated map | Handler
|  | unregisterListeners():void Remove the listeners to the associated map | Handler

Constructor detail

EditPolygonHandler | () | constructor

`public function EditPolygonHandler(map:Map = null, active:Boolean = false, layerToEdit:FeatureLayer = null, featureClickHandler:FeatureClickHandler = null, drawContainer:Sprite = null, isUsedAlone:Boolean = true)`Parameters

| `map:Map` (default = `null`)``
| `active:Boolean` (default = `false`)``
| `layerToEdit:FeatureLayer` (default = `null`)``
| `featureClickHandler:FeatureClickHandler` (default = `null`)``
| `drawContainer:Sprite` (default = `null`)``
| `isUsedAlone:Boolean` (default = `true`)``

Method detail

dragVerticeStart | () | method

`public override function dragVerticeStart(vectorfeature:PointFeature):void`

This function is launched when you are dragging a vertice(Virtual or not)

Parameters

| `vectorfeature:PointFeature`

dragVerticeStop | () | method |

`public override function dragVerticeStop(vectorfeature:PointFeature):void`

This function is launched when you stop dragging a vertice(Virtual or not)

Parameters

| `vectorfeature:PointFeature`

drawTemporaryFeature | () | method |

`protected override function drawTemporaryFeature(event:MouseEvent):void`

To draw the temporaries feature during drag Operation

Parameters

| `event:MouseEvent`

editionModeStart | () | method |

`public override function editionModeStart():Boolean`

This function is used for Polygons edition mode starting

Returns

| `Boolean`