let SDIC be 4 chars
This commit is contained in:
parent
7d7b2e2e6e
commit
cf2d06c543
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
|||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
- v2.21.6 - Let SIDC/icon short code be only 4 chars long
|
||||||
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
- v2.21.5 - Fix handling of "old" ship nav to ship navigation
|
||||||
- v2.21.4 - Fix speed leader length. Add transparentPixels option..
|
- v2.21.4 - Fix speed leader length. Add transparentPixels option..
|
||||||
- v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
|
- v2.21.3 - Add zoom to bounds action. Adjust map layers max zoom levels.
|
||||||
|
13
worldmap.js
13
worldmap.js
@ -151,13 +151,11 @@ module.exports = function(RED) {
|
|||||||
var height = config.height;
|
var height = config.height;
|
||||||
if (height == 0) { height = 10; }
|
if (height == 0) { height = 10; }
|
||||||
var size = ui.getSizes();
|
var size = ui.getSizes();
|
||||||
var frameWidth = (size.sx +size.cx) * width - size.cx;
|
var frameWidth = (size.sx + size.cx) * width - size.cx;
|
||||||
var frameHeight = (size.sy +size.cy) * height - size.cy;
|
var frameHeight = (size.sy + size.cy) * height - size.cy;
|
||||||
var url = encodeURI(config.path);
|
var url = encodeURI(config.path);
|
||||||
var html = `<style>.nr-dashboard-ui_worldmap{padding:0;}</style><div style="overflow:hidden;">
|
var html = `<style>.nr-dashboard-ui_worldmap{padding:0;}</style><div style="overflow:hidden;">
|
||||||
<iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe>
|
<iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe></div>`;
|
||||||
</div>
|
|
||||||
`;
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,7 +217,8 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
setImmediate(function() { RED.nodes.registerType("ui_worldmap", UIWorldMap) });
|
setImmediate(function() { RED.nodes.registerType("ui_worldmap", UIWorldMap) });
|
||||||
}
|
}
|
||||||
}, 250);
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
var WorldMapIn = function(n) {
|
var WorldMapIn = function(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
@ -288,6 +287,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
RED.nodes.registerType("worldmap in",WorldMapIn);
|
RED.nodes.registerType("worldmap in",WorldMapIn);
|
||||||
|
|
||||||
|
|
||||||
var WorldMapTracks = function(n) {
|
var WorldMapTracks = function(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
this.depth = parseInt(Number(n.depth) || 20);
|
this.depth = parseInt(Number(n.depth) || 20);
|
||||||
@ -407,6 +407,7 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
RED.nodes.registerType("worldmap-tracks",WorldMapTracks);
|
RED.nodes.registerType("worldmap-tracks",WorldMapTracks);
|
||||||
|
|
||||||
|
|
||||||
var WorldMapHull = function(n) {
|
var WorldMapHull = function(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
this.prop = n.prop || "layer";
|
this.prop = n.prop || "layer";
|
||||||
|
@ -668,7 +668,7 @@ var addThing = function() {
|
|||||||
var colo = (bits[3] || "#910000").trim();
|
var colo = (bits[3] || "#910000").trim();
|
||||||
var hdg = parseFloat(bits[4] || 0);
|
var hdg = parseFloat(bits[4] || 0);
|
||||||
var drag = true;
|
var drag = true;
|
||||||
var regi = /^[S,G,E,I,O][A-Z]{4}.*/i; // if it looks like a SIDC code
|
var regi = /^[S,G,E,I,O][A-Z]{3}.*/i; // if it looks like a SIDC code
|
||||||
var d = {action:"point", name:bits[0].trim(), layer:lay, draggable:drag, lat:rclk.lat, lon:rclk.lng, hdg:hdg};
|
var d = {action:"point", name:bits[0].trim(), layer:lay, draggable:drag, lat:rclk.lat, lon:rclk.lng, hdg:hdg};
|
||||||
if (regi.test(icon)) {
|
if (regi.test(icon)) {
|
||||||
d.SIDC = (icon.toUpperCase()+"------------").substr(0,12);
|
d.SIDC = (icon.toUpperCase()+"------------").substr(0,12);
|
||||||
|
Loading…
Reference in New Issue
Block a user