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*/) {
|
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());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user