|
|
|
@ -151,13 +151,11 @@ module.exports = function(RED) {
|
|
|
|
|
var height = config.height;
|
|
|
|
|
if (height == 0) { height = 10; }
|
|
|
|
|
var size = ui.getSizes();
|
|
|
|
|
var frameWidth = (size.sx +size.cx) * width - size.cx;
|
|
|
|
|
var frameHeight = (size.sy +size.cy) * height - size.cy;
|
|
|
|
|
var frameWidth = (size.sx + size.cx) * width - size.cx;
|
|
|
|
|
var frameHeight = (size.sy + size.cy) * height - size.cy;
|
|
|
|
|
var url = encodeURI(config.path);
|
|
|
|
|
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>
|
|
|
|
|
</div>
|
|
|
|
|
`;
|
|
|
|
|
<iframe src="${url}" width="${frameWidth}px" height="${frameHeight}px" style="border:none;"></iframe></div>`;
|
|
|
|
|
return html;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -219,7 +217,8 @@ module.exports = function(RED) {
|
|
|
|
|
}
|
|
|
|
|
setImmediate(function() { RED.nodes.registerType("ui_worldmap", UIWorldMap) });
|
|
|
|
|
}
|
|
|
|
|
}, 250);
|
|
|
|
|
}, 100);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var WorldMapIn = function(n) {
|
|
|
|
|
RED.nodes.createNode(this,n);
|
|
|
|
@ -288,6 +287,7 @@ module.exports = function(RED) {
|
|
|
|
|
}
|
|
|
|
|
RED.nodes.registerType("worldmap in",WorldMapIn);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var WorldMapTracks = function(n) {
|
|
|
|
|
RED.nodes.createNode(this,n);
|
|
|
|
|
this.depth = parseInt(Number(n.depth) || 20);
|
|
|
|
@ -407,6 +407,7 @@ module.exports = function(RED) {
|
|
|
|
|
}
|
|
|
|
|
RED.nodes.registerType("worldmap-tracks",WorldMapTracks);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var WorldMapHull = function(n) {
|
|
|
|
|
RED.nodes.createNode(this,n);
|
|
|
|
|
this.prop = n.prop || "layer";
|
|
|
|
|