@nextgis/ngw-map 1.18.1 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ngw-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +6 -4
- package/lib/ngw-map.esm-browser.js.map +1 -1
- package/lib/ngw-map.esm-browser.prod.js +1 -1
- package/lib/ngw-map.esm-browser.prod.js.map +1 -1
- package/lib/ngw-map.esm-bundler.js +1 -1
- package/lib/ngw-map.global.js +6 -4
- package/lib/ngw-map.global.js.map +1 -1
- package/lib/ngw-map.global.prod.js +1 -1
- package/lib/ngw-map.global.prod.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 1.18.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 1.18.2; author: NextGIS */
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import CancelablePromise from '@nextgis/cancelable-promise';
|
|
4
4
|
import { deepmerge, deprecatedWarn, defined, isObject, getIdentifyRadius } from '@nextgis/utils';
|
package/lib/ngw-map.global.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 1.18.
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 1.18.2; author: NextGIS */
|
|
2
2
|
var NgwMap = (function (exports) {
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
@@ -8935,22 +8935,24 @@ var NgwMap = (function (exports) {
|
|
|
8935
8935
|
return oDOM.documentElement;
|
|
8936
8936
|
}
|
|
8937
8937
|
function getIcon(opt) {
|
|
8938
|
-
var _a, _b, _c, _d;
|
|
8938
|
+
var _a, _b, _c, _d, _e;
|
|
8939
8939
|
if (opt === void 0) { opt = {}; }
|
|
8940
8940
|
// default values
|
|
8941
8941
|
var shape = (_a = opt.shape) !== null && _a !== void 0 ? _a : 'circle';
|
|
8942
8942
|
var color = (_b = opt.color) !== null && _b !== void 0 ? _b : 'blue';
|
|
8943
8943
|
var strokeColor = (_c = opt.strokeColor) !== null && _c !== void 0 ? _c : 'white';
|
|
8944
8944
|
var size = (_d = opt.size) !== null && _d !== void 0 ? _d : 12;
|
|
8945
|
+
var rotate = (_e = opt.rotate) !== null && _e !== void 0 ? _e : 0;
|
|
8945
8946
|
var anchor = size / 2;
|
|
8946
8947
|
var defSize = 12;
|
|
8947
|
-
var stroke =
|
|
8948
|
+
var stroke = opt.stroke !== undefined ? Number(opt.stroke) : STROKE;
|
|
8948
8949
|
var scale = size / defSize;
|
|
8949
8950
|
var pathAlias = opt.p || svgPath[shape] || 'circle';
|
|
8950
8951
|
var path = typeof pathAlias === 'string' ? pathAlias : pathAlias(opt);
|
|
8951
8952
|
var svg = insertSvg(opt.svg || generateSvg(size, size, stroke * scale, path));
|
|
8952
8953
|
var fistChild = svg.firstChild;
|
|
8953
|
-
var
|
|
8954
|
+
var scaledAnchor = defSize / 2;
|
|
8955
|
+
var transform = "scale(".concat(scale, ") rotate(").concat(rotate, ", ").concat(scaledAnchor, ", ").concat(scaledAnchor, ")");
|
|
8954
8956
|
fistChild.setAttribute('fill', color);
|
|
8955
8957
|
if (stroke) {
|
|
8956
8958
|
fistChild.setAttribute('stroke', strokeColor);
|