@h21-map/yandex-drawing-manager
Advanced tools
Comparing version 1.0.8 to 1.0.9
83
index.js
ymaps.modules.define('DrawingManager', | ||
function ( | ||
provide | ||
) { | ||
function DrawingManager(map, opts) { | ||
try { | ||
ymaps; | ||
} catch (e) { | ||
throw Error('Ymaps Map JS API is not ready yet!'); | ||
} | ||
let DRAWING_MODE_MARKER = "marker"; | ||
@@ -10,24 +15,17 @@ let DRAWING_MODE_CIRCLE = "circle"; | ||
var DrawingManager = function (map, opts) { | ||
try { | ||
ymaps; | ||
} catch (e) { | ||
throw Error('Ymaps Map JS API is not ready yet!'); | ||
} | ||
let me = this; | ||
me.map = map; | ||
me._opts = opts; | ||
me._drawingType = null; | ||
me._fitBounds = opts._fitBounds || true; | ||
me.markerOptions = opts.markerOptions || {}; | ||
me.circleOptions = opts.circleOptions || {}; | ||
me.areaOptions = opts.areaOptions || {}; | ||
me._enableDraw = opts.enableDraw; | ||
me.radius = opts.circleOptions.radius; | ||
let me = this; | ||
me.map = map; | ||
me._opts = opts; | ||
me._drawingType = null; | ||
me._fitBounds = opts._fitBounds || true; | ||
me.markerOptions = opts.markerOptions || {}; | ||
me.circleOptions = opts.circleOptions || {}; | ||
me.areaOptions = opts.areaOptions || {}; | ||
me._enableDraw = opts.enableDraw; | ||
me.radius = opts.circleOptions.radius; | ||
me.map.events.add('boundschange', () => { | ||
me.map.events.fire('draw:zoom_map', me._getZoom()); | ||
}); | ||
me.map.events.add('boundschange', () => { | ||
me.map.events.fire('draw:zoom_map', me._getZoom()); | ||
}); | ||
}; | ||
@@ -95,15 +93,2 @@ DrawingManager.prototype.setDrawingMode = function (drawingType, opts) { | ||
DrawingManager.prototype.setDefaultCursor = function (cursor) { }; | ||
DrawingManager.prototype.setAreaFitBounds = function () { }; | ||
DrawingManager.prototype.setMarkerFitBounds = function () { }; | ||
DrawingManager.prototype.setCircleFitBounds = function () { }; | ||
DrawingManager.prototype._getInfo = function () { }; | ||
DrawingManager.prototype._vertexMarkerAddEventListener = function () { }; | ||
DrawingManager.prototype._bindMarker = function () { | ||
@@ -652,15 +637,17 @@ | ||
DrawingManager.prototype.destroy = function () { | ||
this._data = null; | ||
this.setMap(null); | ||
}; | ||
DrawingManager.prototype._refresh = function () { | ||
if (this._layer) { | ||
this._layer.update(); | ||
} | ||
return this; | ||
DrawingManager.prototype.extend = function (obj1, obj2) { | ||
return (function (object) { | ||
var property; | ||
for (property in object.prototype) { | ||
this.prototype[property] = object.prototype[property]; | ||
} | ||
return this; | ||
}).apply(obj1, [obj2]); | ||
}; | ||
provide(DrawingManager); | ||
}); | ||
}; | ||
if (typeof module == 'object') { | ||
module.exports = { default: DrawingManager, DrawingManager: DrawingManager }; | ||
} |
@@ -1,24 +0,22 @@ | ||
{ | ||
"name": "@h21-map/yandex-drawing-manager", | ||
"scope":"@h21-map", | ||
"version": "1.0.8", | ||
"scope": "@h21-map", | ||
"version": "1.0.9", | ||
"description": "A library of Yandex Map JS API", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/novakand/h21-map-yandex-drawing-manager" | ||
"type": "git", | ||
"url": "git+https://github.com/novakand/h21-map-yandex-drawing-manager" | ||
}, | ||
"keywords": [ | ||
"yandex", | ||
"yandex-map", | ||
"drawing-manager", | ||
"angular" | ||
"yandex", | ||
"yandex-map", | ||
"drawing-manager", | ||
"angular" | ||
], | ||
"author": "", | ||
"license": "" | ||
} | ||
} |
@@ -10,3 +10,3 @@ # h21-map/yandex-drawing-manager | ||
```bash | ||
import { DrawingManager} from '@h21-map/yandex-drawing-manager' | ||
import {DrawingManager} from '@h21-map/yandex-drawing-manager' | ||
``` |
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
18646
453