@h21-map/google-drawing-manager
Advanced tools
Comparing version 5.0.6 to 5.0.8
17
index.js
@@ -70,6 +70,6 @@ | ||
case DRAWING_MODE_MARKER: | ||
me._bindMarker(); | ||
me._bindMarker(false); | ||
break; | ||
case DRAWING_MODE_CIRCLE: | ||
me._bindCircle(); | ||
me._bindMarker(true); | ||
break; | ||
@@ -86,3 +86,3 @@ case DRAWING_MODE_AREA: | ||
} | ||
if (drawingType == DRAWING_MODE_FITBOUNDS || drawingType == DRAWING_MODE_AREA) { me._drawingType = null; return false } | ||
if (drawingType == DRAWING_MODE_FITBOUNDS || drawingType == DRAWING_MODE_AREA || drawingType == DRAWING_MODE_CIRCLE) { me._drawingType = null; return false } | ||
me._drawingType = drawingType; | ||
@@ -432,10 +432,10 @@ } | ||
DrawingManager.prototype._bindMarker = function () { | ||
DrawingManager.prototype._bindMarker = function (enabledCircle) { | ||
let me = this; | ||
me._removeArea(); | ||
me._removeCenterMarker(); | ||
me._removeCircle(); | ||
google.maps.event.clearListeners(me, 'click'); | ||
google.maps.event.clearListeners(me, 'mousedown'); | ||
google.maps.event.clearListeners(me, 'mouseup'); | ||
me._removeCircle(); | ||
@@ -478,4 +478,8 @@ var createCenterMarker = (e) => { | ||
me._centerMarker.setCursor('pointer'); | ||
if (enabledCircle) { | ||
me._bindCircle() | ||
} | ||
me.position = null; | ||
} | ||
} | ||
@@ -499,3 +503,2 @@ | ||
me._removeCircle(); | ||
if (me._centerMarker) { | ||
@@ -525,3 +528,3 @@ me._circle = new google.maps.Circle({ | ||
me._centerMarkerAddEventListener(); | ||
google.maps.event.clearListeners(me, 'click'); | ||
// google.maps.event.clearListeners(me, 'click'); | ||
google.maps.event.trigger(me, 'draw:circle_create', this._getInfo()); | ||
@@ -528,0 +531,0 @@ } |
{ | ||
"name": "@h21-map/google-drawing-manager", | ||
"scope": "@h21-map", | ||
"version": "5.0.6", | ||
"version": "5.0.8", | ||
"description": "A library of Google Map JS API", | ||
@@ -6,0 +6,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30842
750