forked from MTSR/mapserver
preserve scope
This commit is contained in:
parent
9266c47c1e
commit
1f8109e8b8
@ -180,14 +180,14 @@ export default L.LayerGroup.extend({
|
||||
},
|
||||
|
||||
onAdd: function(/*map*/) {
|
||||
this.layerMgr.addListener(this.reDraw);
|
||||
this.wsChannel.addListener("minetest-info", this.onMinetestUpdate);
|
||||
this.layerMgr.addListener(() => this.reDraw());
|
||||
this.wsChannel.addListener("minetest-info", () => this.onMinetestUpdate());
|
||||
this.reDraw();
|
||||
},
|
||||
|
||||
onRemove: function(/*map*/) {
|
||||
this.clearLayers();
|
||||
this.layerMgr.removeListener(this.reDraw);
|
||||
this.wsChannel.removeListener("minetest-info", this.onMinetestUpdate);
|
||||
this.layerMgr.removeListener(() => this.reDraw());
|
||||
this.wsChannel.removeListener("minetest-info", () => this.onMinetestUpdate());
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user