From 332ec2bd267fcc1294145331c5c49964c86f3854 Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Fri, 19 Jul 2019 19:58:59 +0200 Subject: [PATCH] assign map var --- static/js/overlays/TrainOverlay.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/overlays/TrainOverlay.js b/static/js/overlays/TrainOverlay.js index 4bd19ab..badf7a3 100644 --- a/static/js/overlays/TrainOverlay.js +++ b/static/js/overlays/TrainOverlay.js @@ -179,7 +179,8 @@ export default L.LayerGroup.extend({ }, - onAdd: function(/*map*/) { + onAdd: function(map) { + this.map = map; this.layerMgr.addListener(() => this.reDraw()); this.wsChannel.addListener("minetest-info", () => this.onMinetestUpdate()); this.reDraw();