From 8aa754132ac3eb07059daf8e96821e040da0b05d Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Sun, 5 Dec 2021 17:05:30 +0000 Subject: [PATCH] Bump for dynamic logo PR slight tidy and add to README --- CHANGELOG.md | 1 + README.md | 3 +++ worldmap/index.html | 2 +- worldmap/worldmap.js | 5 +++-- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97b4b3c..ba60556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188. - v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island. - v2.22.2 - Be more tolerant of speed string types - v2.22.0 - Separate out layer events in worldmap in diff --git a/README.md b/README.md index fa09546..0844c4a 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ map web page for plotting "things" on. ### Updates +- v2.23.0 - Give logo and id so it can be overridden by toplogo command. PR #188. - v2.22.3 - Don't show empty popup for geojson object. Issue #186. Add wobble to null island. - v2.22.2 - Be more tolerant of speed string types - v2.22.0 - Separate out layer events in worldmap in @@ -413,6 +414,8 @@ Optional properties include - **button** - if supplied with a `name` and `icon` property - adds a button to provide user input - sends a msg `{"action":"button", "name":"the_button_name"}` to the worldmap in node. If supplied with a `name` property only, it will remove the button. Optional `position` property can be 'bottomright', 'bottomleft', 'topleft' or 'topright' (default). - **contextmenu** - html string to define the right click menu when not on a marker. Defaults to the simple add marker input. Empty string `""` disables this right click. + - **toptitle** - Words to replace title in title bar (if not in iframe) + - **toplogo** - URL to logo image for top tile bar (if not in iframe) - ideally 60px by 24px. #### To switch layer, move map and zoom diff --git a/worldmap/index.html b/worldmap/index.html index e43acc9..50853cf 100644 --- a/worldmap/index.html +++ b/worldmap/index.html @@ -80,7 +80,7 @@
- + Node-RED - map all the things
diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index 6e38c74..2d47b94 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -2075,9 +2075,10 @@ function doCommand(cmd) { } if (cmd.hasOwnProperty("toplogo")) { if (!inIframe ) { - document.getElementById("toplogo").src = cmd.toplogo; + document.getElementById("toplogo").src = cmd.toplogo; + document.getElementById("toplink").setAttribute("style", "pointer-events:none"); } - } + } if (cmd.hasOwnProperty("clear")) { doTidyUp(cmd.clear); }