@nextgis/ngw-leaflet 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-leaflet.esm-browser.js +6 -4
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +6 -4
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +2 -2
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.18.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.18.2; author: NextGIS */
|
|
2
2
|
function styleInject(css, ref) {
|
|
3
3
|
if ( ref === void 0 ) ref = {};
|
|
4
4
|
var insertAt = ref.insertAt;
|
|
@@ -22087,21 +22087,23 @@ function insertSvg(svg) {
|
|
|
22087
22087
|
return oDOM.documentElement;
|
|
22088
22088
|
}
|
|
22089
22089
|
function getIcon(opt = {}) {
|
|
22090
|
-
var _a, _b, _c, _d;
|
|
22090
|
+
var _a, _b, _c, _d, _e;
|
|
22091
22091
|
// default values
|
|
22092
22092
|
const shape = (_a = opt.shape) !== null && _a !== void 0 ? _a : 'circle';
|
|
22093
22093
|
const color = (_b = opt.color) !== null && _b !== void 0 ? _b : 'blue';
|
|
22094
22094
|
const strokeColor = (_c = opt.strokeColor) !== null && _c !== void 0 ? _c : 'white';
|
|
22095
22095
|
const size = (_d = opt.size) !== null && _d !== void 0 ? _d : 12;
|
|
22096
|
+
const rotate = (_e = opt.rotate) !== null && _e !== void 0 ? _e : 0;
|
|
22096
22097
|
const anchor = size / 2;
|
|
22097
22098
|
const defSize = 12;
|
|
22098
|
-
const stroke =
|
|
22099
|
+
const stroke = opt.stroke !== undefined ? Number(opt.stroke) : STROKE;
|
|
22099
22100
|
const scale = size / defSize;
|
|
22100
22101
|
const pathAlias = opt.p || svgPath[shape] || 'circle';
|
|
22101
22102
|
const path = typeof pathAlias === 'string' ? pathAlias : pathAlias(opt);
|
|
22102
22103
|
const svg = insertSvg(opt.svg || generateSvg(size, size, stroke * scale, path));
|
|
22103
22104
|
const fistChild = svg.firstChild;
|
|
22104
|
-
const
|
|
22105
|
+
const scaledAnchor = defSize / 2;
|
|
22106
|
+
const transform = `scale(${scale}) rotate(${rotate}, ${scaledAnchor}, ${scaledAnchor})`;
|
|
22105
22107
|
fistChild.setAttribute('fill', color);
|
|
22106
22108
|
if (stroke) {
|
|
22107
22109
|
fistChild.setAttribute('stroke', strokeColor);
|