triggering on-something-changed

This commit is contained in:
muerwre 2018-09-03 17:09:00 +07:00
parent 2dab345fe8
commit 1ca2691a15
6 changed files with 35 additions and 7 deletions

View file

@ -2,9 +2,10 @@ import { layerGroup } from 'leaflet';
import { Sticker } from '$modules/Sticker';
export class Stickers {
constructor({ map, lockMapClicks }) {
constructor({ map, lockMapClicks, triggerOnChange }) {
this.map = map;
this.layer = layerGroup();
this.triggerOnChange = triggerOnChange;
this.lockMapClicks = lockMapClicks;
this.stickers = [];
@ -27,6 +28,7 @@ export class Stickers {
map: this.map,
lockMapClicks: this.lockMapClicks,
sticker,
triggerOnChange: this.triggerOnChange,
});
this.stickers.push(marker);