Load map.js explicitly from canvas.html.

Without this it's hard to get to map.js in the debug tools since Chrome
doesn't know about the anonymous js. Probably improves logging too.
This commit is contained in:
Dan Albert 2021-05-25 18:46:41 -07:00
parent e6e31fd234
commit de9651533f
2 changed files with 1 additions and 5 deletions

View File

@ -167,11 +167,6 @@ class LeafletMap(QWebEngineView, LiberationMap):
)
self.setPage(self.page)
self.loadFinished.connect(self.load_finished)
def load_finished(self) -> None:
self.page.runJavaScript(Path("resources/ui/map/map.js").read_text())
def set_game(self, game: Optional[Game]) -> None:
if game is None:
self.map_model.clear()

View File

@ -24,6 +24,7 @@
integrity="sha384-XAr1poM2RCR9/QQFki7ylrGSdmvYE0NuHghuRuxb/k9zJQA53y6qR5te5jJRZlcL"
crossorigin="">
</script>
<script src="map.js" defer="defer"></script>
<style>
body { padding: 0; margin: 0; }
html, body, #map { height: 100%; }