I am trying to develop a D2 ui node that contains a square SVG image. The problem is that there is a large gap below the image above the next widget in the dashboard unless the widget size is configured as auto. If the widget size is configured as, for example, 4x4, then the gap is present.
I have developed a very simple test node and a flow that consists of two svg nodes with text nodes around them that shows the problem. It appears as
The upper svg node is sized auto, the lower 4x4. I don't know whether this is a dashboard issue or whether a bit of magic css will sort it, or possibly both I suppose.
If anyone already knows what the problem is then that would be great. If not then if anyone has the time to install the node and give it a go I would be most grateful. It can be installed using
npm install colinl/node-red-dashboard-2-ui-test-node
Here is the test flow
[{"id":"330777a7368c0197","type":"ui-test-node","z":"997da33a0beedade","name":"Test node auto","group":"5adfd329078662d5","order":4,"width":"0","height":"0","label":"Some label","myclass":"","x":400,"y":6440,"wires":[]},{"id":"cc6730e201cdd9bc","type":"ui-text","z":"997da33a0beedade","group":"5adfd329078662d5","order":3,"width":0,"height":0,"name":"Text above","label":"Text above auto sized svg","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":390,"y":6380,"wires":[]},{"id":"d7cf2326a6a5509d","type":"ui-text","z":"997da33a0beedade","group":"5adfd329078662d5","order":5,"width":0,"height":0,"name":"Text between","label":"Text between","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":390,"y":6500,"wires":[]},{"id":"ab2c75e1976ab0cc","type":"ui-text","z":"997da33a0beedade","group":"5adfd329078662d5","order":7,"width":0,"height":0,"name":"Text below","label":"Text below 4x4 sized svg","format":"{{msg.payload}}","layout":"row-spread","style":false,"font":"","fontSize":16,"color":"#717171","className":"","x":390,"y":6620,"wires":[]},{"id":"a840394519d151e1","type":"ui-test-node","z":"997da33a0beedade","name":"Test node 4x4","group":"5adfd329078662d5","order":6,"width":"4","height":"4","label":"Some label","myclass":"","x":400,"y":6560,"wires":[]},{"id":"5adfd329078662d5","type":"ui-group","name":"SVG test","page":"73721cb540947283","width":"5","height":"1","order":-1,"showTitle":false,"className":"","visible":"true","disabled":"false"},{"id":"73721cb540947283","type":"ui-page","name":"SVG test","ui":"ID-BASE-1","path":"/svg","icon":"home","layout":"flex","theme":"f9b6670b127dc219","order":1,"className":"","visible":"true","disabled":"false"},{"id":"ID-BASE-1","type":"ui-base","name":"Dashboard","path":"/dashboard"},{"id":"f9b6670b127dc219","type":"ui-theme","name":"FlowForge Theme","colors":{"surface":"#152a47","primary":"#005aff","bgPage":"#ffffff","groupBg":"#ffffff","groupOutline":"#cc3e3e"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]
A ui-template containing just the same SVG does not show the problem.
To remove the node again npm remove @colinl/node-red-dashboard-2-ui-test-node

