1
0
forked from MTSR/mapserver

preserve scope

This commit is contained in:
Thomas Rudin 2019-07-19 19:52:19 +02:00
parent 9266c47c1e
commit 1f8109e8b8

View File

@ -180,14 +180,14 @@ export default L.LayerGroup.extend({
}, },
onAdd: function(/*map*/) { onAdd: function(/*map*/) {
this.layerMgr.addListener(this.reDraw); this.layerMgr.addListener(() => this.reDraw());
this.wsChannel.addListener("minetest-info", this.onMinetestUpdate); this.wsChannel.addListener("minetest-info", () => this.onMinetestUpdate());
this.reDraw(); this.reDraw();
}, },
onRemove: function(/*map*/) { onRemove: function(/*map*/) {
this.clearLayers(); this.clearLayers();
this.layerMgr.removeListener(this.reDraw); this.layerMgr.removeListener(() => this.reDraw());
this.wsChannel.removeListener("minetest-info", this.onMinetestUpdate); this.wsChannel.removeListener("minetest-info", () => this.onMinetestUpdate());
} }
}); });