Update node.ts

This commit is contained in:
piotrpekala7 2020-09-10 00:36:32 +02:00
parent dd7dcf4dab
commit 305182b01f

View File

@ -87,11 +87,13 @@ export class NodeWidget implements Widget {
})
.attr('xnode:href', (n: MapNode) => n.symbolUrl)
.attr('width', (n: MapNode) => {
if (n.nodeType === 'cloud' || n.nodeType === 'nat') return n.width;
if (!n.width) return 60;
if (n.width > 64) return 64;
return n.width;
})
.attr('height', (n: MapNode) => {
if (n.nodeType === 'cloud' || n.nodeType === 'nat') return n.height;
if (!n.height) return 60;
if (n.height > 64) return 64;
return n.height;