@kizmann/pico-js 1.0.4 → 1.0.6
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/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -2
- package/src/library/map.js +14 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kizmann/pico-js",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.6",
|
4
4
|
"license": "MIT",
|
5
5
|
"type": "module",
|
6
6
|
"private": false,
|
@@ -43,7 +43,6 @@
|
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
45
|
"docsify": "^4.13.1",
|
46
|
-
"global": "^4.4.0",
|
47
46
|
"moment": "^2.30.1"
|
48
47
|
}
|
49
48
|
}
|
package/src/library/map.js
CHANGED
@@ -327,6 +327,10 @@ export default class Map
|
|
327
327
|
item.info.open(this.map, item.marker);
|
328
328
|
}
|
329
329
|
|
330
|
+
if ( Any.isFunction(item.onOpen) ) {
|
331
|
+
item.onOpen(item);
|
332
|
+
}
|
333
|
+
|
330
334
|
this.styleMarker(key, 'active');
|
331
335
|
|
332
336
|
return hidden;
|
@@ -350,6 +354,10 @@ export default class Map
|
|
350
354
|
item.info.close();
|
351
355
|
}
|
352
356
|
|
357
|
+
if ( Any.isFunction(item.onClose) ) {
|
358
|
+
item.onClose(item);
|
359
|
+
}
|
360
|
+
|
353
361
|
this.styleMarker(key, 'default');
|
354
362
|
|
355
363
|
return visible;
|
@@ -368,14 +376,14 @@ export default class Map
|
|
368
376
|
}
|
369
377
|
|
370
378
|
item.extras = Obj.except(options, [
|
371
|
-
'map', 'position', 'lat', 'lng', 'html', 'style', 'visible'
|
379
|
+
'map', 'position', 'lat', 'lng', 'html', 'style', 'visible', 'onOpen', 'onClose'
|
372
380
|
]);
|
373
381
|
|
374
382
|
if ( ! Obj.has(options, 'map') ) {
|
375
383
|
options.map = this.map;
|
376
384
|
}
|
377
385
|
|
378
|
-
if ( ! Obj.has(options, '
|
386
|
+
if ( ! Obj.has(options, 'position') ) {
|
379
387
|
options.position = Obj.only(options, ['lat', 'lng']);
|
380
388
|
}
|
381
389
|
|
@@ -389,6 +397,10 @@ export default class Map
|
|
389
397
|
item.marker.setVisible(false);
|
390
398
|
}
|
391
399
|
|
400
|
+
Obj.assign(item, {
|
401
|
+
onOpen: Obj.get(options, 'onOpen'), onClose: Obj.get(options, 'onClose'),
|
402
|
+
})
|
403
|
+
|
392
404
|
Obj.set(this.markers, key, item);
|
393
405
|
|
394
406
|
this.clusterMarkers(this.clusterOptions, null, false);
|