0

Make JSObserver work with Leaflet. Fixes #1451.

This commit is contained in:
Willem Mulder
2018-10-08 19:35:37 +02:00
parent 3cceaf5869
commit 4efb9f2d89
4 changed files with 47 additions and 2 deletions

View File

@@ -294,7 +294,7 @@ class JSObserver(Observer):
"""
self._current_value = current_value
if self._need_update():
refresh = max(1500*(time.time() - self.last_update_time), self.minrefresh) // 1
refresh = max(1500*(time.time() - max(self.start_time, self.last_update_time)), self.minrefresh) // 1
self.logfile.seek(0)
self.logfile.truncate()
if self.get_current_value():