@h21-map/yandex-drawing-manager
Advanced tools
Comparing version 12.3.0 to 15.1.0
31
index.js
@@ -224,3 +224,5 @@ function DrawingManager(map, opts) { | ||
strokeWidth: me.circleOptions.strokeWeight, | ||
syncOverlayInit: true, | ||
syncOverlayInit: false, | ||
zIndex: 100, | ||
zIndexHover: 100, | ||
@@ -231,6 +233,7 @@ } | ||
me.map.geoObjects.add(me._circle); | ||
me.map.events.fire('draw:circle_create', me._getInfo()); | ||
me.circleOptions.fitBounds && me._fitBoundsCircle(); | ||
me._circle.events.add('click', function (event) { event.stopPropagation() }); | ||
me._fitBoundsCircle(); | ||
me._centerMarker.options.set({ | ||
@@ -281,6 +284,6 @@ draggable: true, | ||
patch.push(event.get('coords')); | ||
let area = me.geodesicArea(patch); | ||
const area = me.geodesicArea(patch); | ||
if (area < me.squareArea * 1000000) { | ||
me._area.geometry.setCoordinates(patch); | ||
_patch.push(event.get('coords')); | ||
me._area.geometry.setCoordinates(_patch); | ||
me.map.container.getElement().style.cursor = 'crosshair'; | ||
@@ -306,5 +309,4 @@ return false; | ||
me.polygonArea.set(me.vertexCount, me._area); | ||
me.map.events.fire('draw:area_create', me._convertCoordinates(patch)); | ||
me.areaOptions.fitBounds && me._fitBoundsArea(); | ||
me._fitBoundsArea(_patch); | ||
@@ -429,3 +431,3 @@ if (me.isMoreArea) { | ||
const me = this; | ||
let latlngs = me._convertlatlngs(); | ||
const latlngs = me._convertlatlngs(); | ||
@@ -443,6 +445,3 @@ const options = { | ||
me.map.geoObjects.add(me._area); | ||
me.map.events.fire('draw:area_create', me._convertCoordinates(latlngs)); | ||
if (me.areaOptions.fitBounds) { | ||
me._fitBoundsArea(); | ||
} | ||
me._fitBoundsArea(latlngs); | ||
@@ -494,3 +493,3 @@ }; | ||
DrawingManager.prototype._fitBoundsArea = function () { | ||
DrawingManager.prototype._fitBoundsArea = function (latlng) { | ||
const me = this; | ||
@@ -500,2 +499,3 @@ if (me._area) { | ||
} | ||
me.map.events.fire('draw:area_create', me._convertCoordinates(latlng)); | ||
}; | ||
@@ -507,2 +507,3 @@ | ||
me.map.setBounds(me._circle.geometry.getBounds()); | ||
me.map.events.fire('draw:circle_create', me._getInfo()); | ||
}; | ||
@@ -552,2 +553,3 @@ | ||
center: center, | ||
zoom: me.map.getZoom(), | ||
} | ||
@@ -893,3 +895,4 @@ return { eventArea }; | ||
radius: Math.floor(me._circle.geometry.getRadius()), | ||
position | ||
position, | ||
zoom: me.map.getZoom(), | ||
}; | ||
@@ -896,0 +899,0 @@ |
@@ -5,3 +5,3 @@ | ||
"scope": "@h21-map", | ||
"version": "12.3.0", | ||
"version": "15.1.0", | ||
"description": "A library of Yandex Map JS API", | ||
@@ -8,0 +8,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
34521
826