node-red-contrib-web-worldmap 2.21.6 → 2.21.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
1
  ### Change Log for Node-RED Worldmap
2
2
 
3
+ - v2.21.7 - Let SIDC/icon short code be only 4 chars long
3
4
  - v2.21.5 - Fix handling of "old" ship nav to ship navigation
4
5
  - v2.21.4 - Fix speed leader length. Add transparentPixels option.
5
6
  - v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
package/README.md CHANGED
@@ -11,6 +11,7 @@ map web page for plotting "things" on.
11
11
 
12
12
  ### Updates
13
13
 
14
+ - v2.21.7 - Let SIDC/icon short code be only 4 chars long
14
15
  - v2.21.5 - Fix handling of "old" ship nav to ship navigation
15
16
  - v2.21.4 - Fix speed leader length. Add transparentPixels option..
16
17
  - v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-web-worldmap",
3
- "version": "2.21.6",
3
+ "version": "2.21.7",
4
4
  "description": "A Node-RED node to provide a web page of a world map for plotting things on.",
5
5
  "dependencies": {
6
6
  "@turf/bezier-spline": "~6.5.0",
@@ -668,7 +668,7 @@ var addThing = function() {
668
668
  var colo = (bits[3] || "#910000").trim();
669
669
  var hdg = parseFloat(bits[4] || 0);
670
670
  var drag = true;
671
- var regi = /^[S,G,E,I,O][A-Z]{4}.*/i; // if it looks like a SIDC code
671
+ var regi = /^[S,G,E,I,O][A-Z]{3}.*/i; // if it looks like a SIDC code
672
672
  var d = {action:"point", name:bits[0].trim(), layer:lay, draggable:drag, lat:rclk.lat, lon:rclk.lng, hdg:hdg};
673
673
  if (regi.test(icon)) {
674
674
  d.SIDC = (icon.toUpperCase()+"------------").substr(0,12);
package/worldmap.js CHANGED
@@ -151,13 +151,11 @@ module.exports = function(RED) {
151
151
  var height = config.height;
152
152
  if (height == 0) { height = 10; }
153
153
  var size = ui.getSizes();
154
- var frameWidth = (size.sx +size.cx) * width - size.cx;
155
- var frameHeight = (size.sy +size.cy) * height - size.cy;
154
+ var frameWidth = (size.sx + size.cx) * width - size.cx;
155
+ var frameHeight = (size.sy + size.cy) * height - size.cy;
156
156
  var url = encodeURI(config.path);
157
157
  var html = `<style>.nr-dashboard-ui_worldmap{padding:0;}</style><div style="overflow:hidden;">
158
- <iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe>
159
- </div>
160
- `;
158
+ <iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe></div>`;
161
159
  return html;
162
160
  }
163
161
 
@@ -219,7 +217,8 @@ module.exports = function(RED) {
219
217
  }
220
218
  setImmediate(function() { RED.nodes.registerType("ui_worldmap", UIWorldMap) });
221
219
  }
222
- }, 250);
220
+ }, 100);
221
+
223
222
 
224
223
  var WorldMapIn = function(n) {
225
224
  RED.nodes.createNode(this,n);
@@ -288,6 +287,7 @@ module.exports = function(RED) {
288
287
  }
289
288
  RED.nodes.registerType("worldmap in",WorldMapIn);
290
289
 
290
+
291
291
  var WorldMapTracks = function(n) {
292
292
  RED.nodes.createNode(this,n);
293
293
  this.depth = parseInt(Number(n.depth) || 20);
@@ -407,6 +407,7 @@ module.exports = function(RED) {
407
407
  }
408
408
  RED.nodes.registerType("worldmap-tracks",WorldMapTracks);
409
409
 
410
+
410
411
  var WorldMapHull = function(n) {
411
412
  RED.nodes.createNode(this,n);
412
413
  this.prop = n.prop || "layer";