Pass a binded function to zoomToSeeLayer MarkerCluster function

fix #611
This commit is contained in:
Yohan Boniface 2018-08-17 09:30:18 +02:00
parent 6ae91d2f53
commit 01fa7543a2
2 changed files with 3 additions and 2 deletions

View file

@ -670,11 +670,11 @@ L.U.Map.include({
color.style.backgroundImage = 'url(' + symbol + ')';
}
L.DomEvent.on(zoom_to, 'click', function (e) {
e.callback = this.view;
e.callback = L.bind(this.view, this);
this.bringToCenter(e);
}, feature);
L.DomEvent.on(title, 'click', function (e) {
e.callback = this.view
e.callback = L.bind(this.view, this)
this.bringToCenter(e);
}, feature);
L.DomEvent.on(edit, 'click', function () {

View file

@ -62,6 +62,7 @@ L.U.FeatureMixin = {
}
return;
}
// TODO deal with an event instead?
if (this.map.slideshow) this.map.slideshow.current = this;
this.attachPopup();
this.openPopup(e && e.latlng || this.getCenter());