diff --git a/CHANGELOG.md b/CHANGELOG.md index a2445c6..a836ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.22.2 - Be more tolerant of speed string types - v2.22.0 - Separate out layer events in worldmap in - v2.21.9 - Unbreak Drawing layer that I must have broken recently - v2.21.8 - Let SIDC/icon short code be only 4 chars long diff --git a/README.md b/README.md index 4a2426e..0590c30 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ map web page for plotting "things" on. ### Updates +- v2.22.2 - Be more tolerant of speed string types - v2.22.0 - Separate out layer events in worldmap in - v2.21.9 - Unbreak Drawing layer that I must have broken recently - v2.21.8 - Let SIDC/icon short code be only 4 chars long diff --git a/package.json b/package.json index a667975..42ceefd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.22.0", + "version": "2.22.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", diff --git a/worldmap.js b/worldmap.js index 5b8def7..c7f8655 100644 --- a/worldmap.js +++ b/worldmap.js @@ -252,7 +252,7 @@ module.exports = function(RED) { if ((node.events.indexOf("point")!==-1) && ((message.action === "point")||(message.action === "move")||(message.action === "delete") )) { setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})}); } - if ((node.events.indexOf("layer")!==-1) && ((message.action === "layer") )) { + if ((node.events.indexOf("layer")!==-1) && (message.action.indexOf("layer") !== -1) ) { setImmediate(function() {node.send({payload:message, topic:node.path.substr(1), _sessionid:client.id, _sessionip:sessionip})}); } if ((node.events.indexOf("files")!==-1) && (message.action === "file")) { diff --git a/worldmap/worldmap.js b/worldmap/worldmap.js index 847c62e..92f24a6 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -1954,7 +1954,7 @@ function setMarker(data) { if (data.dashArray) { delete data.dashArray; } if (data.fill) { delete data.fill; } if (data.draggable) { delete data.draggable; } - if (!isNaN(data.speed)) { data.speed = data.speed.toFixed(2); } + //if (!isNaN(data.speed)) { data.speed = data.speed.toFixed(2); } if (data.hasOwnProperty("clickable")) { delete data.clickable; } if (data.hasOwnProperty("fillColor")) { delete data.fillColor; } if (data.hasOwnProperty("radius")) { delete data.radius; }