diff --git a/CHANGELOG.md b/CHANGELOG.md index fa674da..aaf9c93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### Change Log for Node-RED Worldmap + - v2.18.§ - Let fillOpacity be 0. - v2.18.0 - Add bounds event onzoom or drag. - v2.17.3 - Yet more better feedback on clicks, moves. - v2.17.2 - Add smallplane icon. diff --git a/README.md b/README.md index 8b0d1d1..9ce000e 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ map web page for plotting "things" on. ### Updates +- v2.18.§ - Let fillOpacity be 0. - v2.18.0 - Add bounds event onzoom or drag. - v2.17.3 - Yet more better feedback on clicks, moves. - v2.17.2 - Add smallplane icon. diff --git a/package.json b/package.json index 380e587..bcc91f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "2.18.0", + "version": "2.18.1", "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/worldmap.js b/worldmap/worldmap.js index 39835f7..b5d628d 100644 --- a/worldmap/worldmap.js +++ b/worldmap/worldmap.js @@ -46,34 +46,6 @@ var iconSz = { "Command": 44 }; -// Polyfill assign for IE11 for now -if (typeof Object.assign !== 'function') { - // Must be writable: true, enumerable: false, configurable: true - Object.defineProperty(Object, "assign", { - value: function assign(target, varArgs) { // .length of function is 2 - 'use strict'; - if (target === null || target === undefined) { - throw new TypeError('Cannot convert undefined or null to object'); - } - var to = Object(target); - for (var index = 1; index < arguments.length; index++) { - var nextSource = arguments[index]; - if (nextSource !== null && nextSource !== undefined) { - for (var nextKey in nextSource) { - // Avoid bugs when hasOwnProperty is shadowed - if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { - to[nextKey] = nextSource[nextKey]; - } - } - } - } - return to; - }, - writable: true, - configurable: true - }); -} - // Create the socket var connect = function() { // var transports = ["websocket", "xhr-streaming", "xhr-polling"], @@ -1287,10 +1259,11 @@ function setMarker(data) { opt.stroke = (data.hasOwnProperty("stroke")) ? data.stroke : true; opt.weight = data.weight || 2; opt.opacity = data.opacity || 1; - opt.fillOpacity = data.fillOpacity || 0.2; + opt.fillOpacity = data.fillOpacity; opt.clickable = (data.hasOwnProperty("clickable")) ? data.clickable : false; opt.fill = (data.hasOwnProperty("fill")) ? data.fill : true; if (data.hasOwnProperty("dashArray")) { opt.dashArray = data.dashArray; } + if (opt.fillOpacity === undefined) { opt.fillOpacity = 0.2; } // Replace building if (data.hasOwnProperty("building")) {