diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-03-12 23:31:36 +0000 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-03-12 23:31:36 +0000 |
commit | 93cf4e90320df21215a081a389cd2ab98a8a2d0d (patch) | |
tree | e79fede0d7730b13d3282100f405fac3e4b37762 /web/nms.gathering.org/js/nms.js | |
parent | 83e6b5e193799cabdc0af876178f385faef5e172 (diff) |
NMSjs: Bump map handlers and more
The idea is that map handlers just register for events instead of this
periodic update.
Diffstat (limited to 'web/nms.gathering.org/js/nms.js')
-rw-r--r-- | web/nms.gathering.org/js/nms.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/web/nms.gathering.org/js/nms.js b/web/nms.gathering.org/js/nms.js index 9300b2d..7564d72 100644 --- a/web/nms.gathering.org/js/nms.js +++ b/web/nms.gathering.org/js/nms.js @@ -289,7 +289,10 @@ nms.playback.tick = function() // Update data and force redraw // FIXME: nmsData merge - nms.updater.updater(); + // nms.updater.updater(); + // FIXME: 2: This should not be necsarry. The updaters should be + // data-driven, not time-driven. E.g.: If nmsData upates, the handlers + // should run. } /* * Helper function for safely getting a valid now-epoch @@ -530,14 +533,12 @@ function setUpdater(fo) { nms.updater = undefined; nmsMap.reset(); + nmsData.unregisterHandlerWildcard("mapHandler"); fo.init(); nms.updater = fo; var foo = document.getElementById("updater_name"); foo.innerHTML = fo.name + " "; document.location.hash = fo.tag; - if (nms.ping_data && nms.switches_then && nmsData.switches) { - nms.updater.updater(); - } } /* |