Skip to content

Commit

Permalink
Fix contextmenu second use...
Browse files Browse the repository at this point in the history
to close #259
  • Loading branch information
dceejay committed Feb 8, 2024
1 parent 25d0d65 commit 89c7e3e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Change Log for Node-RED Worldmap

- v4.6.2 - Fix multiple use of contextmenu feedback. Issue #259
- v4.6.1 - let default pmtiles be light/dark or monocolored.
- v4.5.2 - Tidy up when pmtiles removed.
- v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Feel free to [![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%

### Updates

- v4.6.1 - let default pmtiles be light/dark or monocolored.
- v4.6.2 - Fix multiple use of contextmenu feedback. Issue #259
- v4.6.1 - Let default pmtiles be light/dark or monocolored.
- v4.5.2 - Tidy up when pmtiles removed.
- v4.5.0 - Fix pmtiles to look for maps in userdir rather than modules
- v4.4.0 - Add quad(copter) drone icon.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "4.6.1",
"version": "4.6.2",
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
"dependencies": {
"@turf/bezier-spline": "~6.5.0",
Expand Down
6 changes: 4 additions & 2 deletions worldmap/worldmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,8 +908,10 @@ map.on('contextmenu', function(e) {
rclk = e.latlng;
form = {};
var ramen = ""+addmenu;
for (const item in rmenudata) {
ramen = ramen.replace(new RegExp("\\${"+item+"}","g"),rmenudata[item]);
if (typeof rmenudata !== "string") {
for (const item in rmenudata) {
ramen = ramen.replace(new RegExp("\\${"+item+"}","g"),rmenudata[item]);
}
}
ramen = ramen.replace(/\${.*?}/g,'')
rightmenuMap.setContent(ramen);
Expand Down

0 comments on commit 89c7e3e

Please sign in to comment.