tidy up layers event

This commit is contained in:
Dave Conway-Jones 2021-11-26 16:35:14 +00:00
parent fdfe82ec37
commit 182c38b376
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
5 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -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",

View File

@ -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")) {

View File

@ -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; }