I have attached a MouuseEvent.click to each of my FeatueLayer and I want to disable the move of the polygon
(oplList.layer as FeatureLayer).addEventListener(MouseEvent.CLICK,polygonSelectHandler);
In the polygonSelectHandler , activate method I just pass the Edit Vertcies alone , but I'm unable to disable the move. I also tried changing in the editor.editTool.activate method.Please direct , how can we handle this situation.
private function polygonSelectHandler(event:MouseEvent):void
{
try
{
if (event.target is Graphic)
{
editGraphic = Graphic(event.target);
lastActiveEditType = "none"; }
if (editGraphic.geometry is Polyline || editGraphic.geometry is Polygon)
{
if (lastActiveEditType == "none")
{
isEditing = true;
lastActiveEditType = "moveEditVertices";
myeditTool.activate(EditTool.EDIT_VERTICES, [ editGraphic ]);
}
else if (lastActiveEditType == "moveEditVertices")
{
isEditing = false;
editGraphic = null;
lastActiveEditType = "none";
myeditTool.deactivate();
}
}
else
{
if (lastActiveEditType == "none")
{
isEditing = true;
lastActiveEditType = "moveEditVertices";
myeditTool.activate(EditTool.EDIT_VERTICES, [ editGraphic ]);
}
else
{
isEditing = false;
editGraphic = null;
lastActiveEditType = "none";
myeditTool.deactivate();
}
}
}