@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
package/lib/ngw-map.cjs.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 events = {exports: {}};
|
|
3
3
|
|
|
4
4
|
var R = typeof Reflect === 'object' ? Reflect : null;
|
|
@@ -8061,21 +8061,23 @@ function insertSvg(svg) {
|
|
|
8061
8061
|
return oDOM.documentElement;
|
|
8062
8062
|
}
|
|
8063
8063
|
function getIcon(opt = {}) {
|
|
8064
|
-
var _a, _b, _c, _d;
|
|
8064
|
+
var _a, _b, _c, _d, _e;
|
|
8065
8065
|
// default values
|
|
8066
8066
|
const shape = (_a = opt.shape) !== null && _a !== void 0 ? _a : 'circle';
|
|
8067
8067
|
const color = (_b = opt.color) !== null && _b !== void 0 ? _b : 'blue';
|
|
8068
8068
|
const strokeColor = (_c = opt.strokeColor) !== null && _c !== void 0 ? _c : 'white';
|
|
8069
8069
|
const size = (_d = opt.size) !== null && _d !== void 0 ? _d : 12;
|
|
8070
|
+
const rotate = (_e = opt.rotate) !== null && _e !== void 0 ? _e : 0;
|
|
8070
8071
|
const anchor = size / 2;
|
|
8071
8072
|
const defSize = 12;
|
|
8072
|
-
const stroke =
|
|
8073
|
+
const stroke = opt.stroke !== undefined ? Number(opt.stroke) : STROKE;
|
|
8073
8074
|
const scale = size / defSize;
|
|
8074
8075
|
const pathAlias = opt.p || svgPath[shape] || 'circle';
|
|
8075
8076
|
const path = typeof pathAlias === 'string' ? pathAlias : pathAlias(opt);
|
|
8076
8077
|
const svg = insertSvg(opt.svg || generateSvg(size, size, stroke * scale, path));
|
|
8077
8078
|
const fistChild = svg.firstChild;
|
|
8078
|
-
const
|
|
8079
|
+
const scaledAnchor = defSize / 2;
|
|
8080
|
+
const transform = `scale(${scale}) rotate(${rotate}, ${scaledAnchor}, ${scaledAnchor})`;
|
|
8079
8081
|
fistChild.setAttribute('fill', color);
|
|
8080
8082
|
if (stroke) {
|
|
8081
8083
|
fistChild.setAttribute('stroke', strokeColor);
|