diff --git a/CHANGELOG.md b/CHANGELOG.md index a89fcf8..8264e35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v1.5.27 - Add hide right click option to config panel - v1.5.26 - Ensure all map tiles loaded over https - v1.5.25 - Add button command to allow user to add and remove buttons - v1.5.24 - ensure hiderightclick does do that, and popup always has close button. Issue #69, #70 diff --git a/README.md b/README.md index 28aa828..dab56e2 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ map web page for plotting "things" on. ### Updates +- v1.5.27 - Add hide right click option to config panel - v1.5.26 - Ensure all map tiles loaded over https - v1.5.25 - Add button command to allow user to add and remove buttons - v1.5.24 - Ensure hiderightclick does do that, and popup always has close button. Issue #69, #70 @@ -280,7 +281,7 @@ Optional properties include - **clear** - layer name - to clear a complete layer and remove from layer menu - **panlock** - lock the map area to the current visible area. - `{"command":{"panlock":true}}` - **zoomlock** - locks the zoom control to the current value and removes zoom control - `{"command":{"zoomlock":true}}` - - **hiderightclick** - disables the right click that allows adding points to the map - `{"command":{"hiderightclick":true}}` + - **hiderightclick** - disables the right click that allows adding or deleting points on the map - `{"command":{"hiderightclick":true}}` - **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). diff --git a/package.json b/package.json index df15f04..bdf7f10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "1.5.26", + "version": "1.5.27", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "cgi": "0.3.1", diff --git a/worldmap.html b/worldmap.html index 918f719..49e6863 100644 --- a/worldmap.html +++ b/worldmap.html @@ -75,9 +75,14 @@
- + + + + Right click +
@@ -153,6 +158,7 @@ then by default ⌘⇧m - ctrl-shift-m will load the m panit: {value:"false"}, panlock: {value:"false"}, zoomlock: {value:"false"}, + hiderightclick: {value:"false"}, path: {value:"/worldmap"} }, inputs:1, @@ -173,6 +179,10 @@ then by default ⌘⇧m - ctrl-shift-m will load the m $("#node-input-path").val("worldmap"); this.path = "worldmap"; } + if ($("#node-input-hiderightclick").val() === null) { + $("#node-input-hiderightclick").val("false"); + this.hiderightclick = "false"; + } $("#node-input-zoom").spinner({min:0, max:18}); $("#node-input-cluster").spinner({min:0, max:19}); } diff --git a/worldmap.js b/worldmap.js index 4a3120b..3ba05b6 100644 --- a/worldmap.js +++ b/worldmap.js @@ -38,6 +38,7 @@ module.exports = function(RED) { this.panlock = n.panlock || "false"; this.zoomlock = n.zoomlock || "false"; this.panit = n.panit || "false"; + this.hiderightclick = n.hiderightclick || "false"; this.path = n.path || "/worldmap"; if (this.path.charAt(0) != "/") { this.path = "/" + this.path; } if (!sockets[this.path]) { @@ -70,6 +71,7 @@ module.exports = function(RED) { c.panlock = node.panlock; c.zoomlock = node.zoomlock; c.showlayers = node.layers; + c.hiderightclick = node.hiderightclick; client.write(JSON.stringify({command:c})); } }); diff --git a/worldmap/worldmap.appcache b/worldmap/worldmap.appcache index 1c47860..a1a29e6 100644 --- a/worldmap/worldmap.appcache +++ b/worldmap/worldmap.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# date: Feb 23rd 2019 - v1.5.26 +# date: Feb 25th 2019 - v1.5.27 CACHE: index.html