|
|
|
@ -221,8 +221,7 @@ Map {
@@ -221,8 +221,7 @@ Map {
|
|
|
|
|
|
|
|
|
|
var polygonPath = polygonDrawerPolygon.path |
|
|
|
|
polygonPath.pop() // get rid of drag coordinate |
|
|
|
|
polygonDrawer._clearPolygon() |
|
|
|
|
polygonDrawer.drawingPolygon = false |
|
|
|
|
_cancelCapturePolygon() |
|
|
|
|
polygonDrawer._callbackObject.polygonCaptureFinished(polygonPath) |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
@ -292,12 +291,27 @@ Map {
@@ -292,12 +291,27 @@ Map {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function finishAdjustPolygon() { |
|
|
|
|
_cancelAdjustPolygon() |
|
|
|
|
polygonDrawer._callbackObject.polygonAdjustFinished() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Cancels an in progress draw or adjust |
|
|
|
|
function cancelPolygonEdit() { |
|
|
|
|
_cancelAdjustPolygon() |
|
|
|
|
_cancelCapturePolygon() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function _cancelAdjustPolygon() { |
|
|
|
|
polygonDrawer.adjustingPolygon = false |
|
|
|
|
for (var i=0; i<polygonDrawer._vertexDragList.length; i++) { |
|
|
|
|
polygonDrawer._vertexDragList[i].destroy() |
|
|
|
|
} |
|
|
|
|
polygonDrawer._vertexDragList = [] |
|
|
|
|
polygonDrawer._callbackObject.polygonAdjustFinished() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function _cancelCapturePolygon() { |
|
|
|
|
polygonDrawer._clearPolygon() |
|
|
|
|
polygonDrawer.drawingPolygon = false |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function _clearPolygon() { |
|
|
|
|