I got an issue with the alignment of certain nodes on MacOS. This issue only occurs with a few nodes (like 5-10% of total nodes, I'd estimate). It seems like it has something to do with the name of the node and the resulting text length.
The grid and automatic alignment to the grid are enabled. The grid size is 20.
I'm including a few photos here that best illustrate the problem. It involves the "Grafana" Inject node and the "Code (Query)" Template node. The problem occurs with these two nodes on MacOS. In addition to that, it also affects the size of the groups:
It's a Macbook Air M1 13,3". It doesn't matter whether I'm using the Brave browser or Safari. The monitor resolution also doesn't seem to be a factor. As far as I remember, this is not a new problem and it's been there since I started using Node-RED on this Laptop (around 4 years). So nothing changed with any MacOS or Node-RED update lately.
Maybe not that easy to reproduce but still, here's the exported Flow JSON:
[
{
"id": "96b6fe53ebf36e77",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "c0d359d0b592b252",
"type": "group",
"z": "96b6fe53ebf36e77",
"name": "Group 1",
"style": {
"label": true
},
"nodes": [
"0fc53b0a40df6a49",
"e6615d8c361455a9",
"48cbf28ab828ed65",
"3ee751a4983f5a2e"
],
"x": 34,
"y": 24,
"w": 462,
"h": 157
},
{
"id": "a40896610389fae2",
"type": "group",
"z": "96b6fe53ebf36e77",
"name": "Group 2",
"style": {
"label": true
},
"nodes": [
"84351d05b56a13fc",
"f40f3201baeee9ce",
"c7b35bfaec95e1d1"
],
"x": 34,
"y": 199,
"w": 482,
"h": 82
},
{
"id": "7e09cce17ec213a7",
"type": "group",
"z": "96b6fe53ebf36e77",
"name": "Group 3",
"style": {
"label": true
},
"nodes": [
"fbb53858486fa0e9",
"61b1a05939ae26bd",
"5ea9460a9469f4e2"
],
"x": 34,
"y": 299,
"w": 492,
"h": 82
},
{
"id": "9fee12609838f08b",
"type": "group",
"z": "96b6fe53ebf36e77",
"name": "Group 4",
"style": {
"label": true
},
"nodes": [
"aacf27c39f4dc894",
"3ca7dcf78586d057",
"54cd34f83d455305"
],
"x": 144,
"y": 393,
"w": 378,
"h": 174
},
{
"id": "54cd34f83d455305",
"type": "group",
"z": "96b6fe53ebf36e77",
"g": "9fee12609838f08b",
"name": "Sub-Group",
"style": {
"label": true
},
"nodes": [
"ca474883f569af8e",
"dd3bbe8d86252c75"
],
"x": 414,
"y": 419,
"w": 82,
"h": 122
},
{
"id": "84351d05b56a13fc",
"type": "debug",
"z": "96b6fe53ebf36e77",
"g": "a40896610389fae2",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 455,
"y": 240,
"wires": [],
"l": false
},
{
"id": "0fc53b0a40df6a49",
"type": "link out",
"z": "96b6fe53ebf36e77",
"g": "c0d359d0b592b252",
"name": "link out group 1",
"mode": "link",
"links": [
"fbb53858486fa0e9"
],
"x": 455,
"y": 140,
"wires": []
},
{
"id": "e6615d8c361455a9",
"type": "switch",
"z": "96b6fe53ebf36e77",
"g": "c0d359d0b592b252",
"name": "Switch Node",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "eq",
"v": "",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 455,
"y": 80,
"wires": [
[],
[],
[],
[]
],
"l": false
},
{
"id": "fbb53858486fa0e9",
"type": "link in",
"z": "96b6fe53ebf36e77",
"g": "7e09cce17ec213a7",
"name": "link in group 3",
"links": [
"0fc53b0a40df6a49"
],
"x": 130,
"y": 340,
"wires": [
[
"5ea9460a9469f4e2"
]
],
"l": true
},
{
"id": "aacf27c39f4dc894",
"type": "link in",
"z": "96b6fe53ebf36e77",
"g": "9fee12609838f08b",
"name": "link in group 4",
"links": [
"1a6d939c29db8b31"
],
"x": 185,
"y": 480,
"wires": [
[
"3ca7dcf78586d057"
]
]
},
{
"id": "3ca7dcf78586d057",
"type": "function",
"z": "96b6fe53ebf36e77",
"g": "9fee12609838f08b",
"name": "function 1",
"func": "\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 280,
"y": 480,
"wires": [
[
"ca474883f569af8e",
"dd3bbe8d86252c75"
]
]
},
{
"id": "ca474883f569af8e",
"type": "change",
"z": "96b6fe53ebf36e77",
"g": "54cd34f83d455305",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 455,
"y": 460,
"wires": [
[]
],
"l": false
},
{
"id": "dd3bbe8d86252c75",
"type": "switch",
"z": "96b6fe53ebf36e77",
"g": "54cd34f83d455305",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 455,
"y": 500,
"wires": [
[]
],
"l": false
},
{
"id": "61b1a05939ae26bd",
"type": "mqtt out",
"z": "96b6fe53ebf36e77",
"g": "7e09cce17ec213a7",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "",
"x": 450,
"y": 340,
"wires": []
},
{
"id": "48cbf28ab828ed65",
"type": "inject",
"z": "96b6fe53ebf36e77",
"g": "c0d359d0b592b252",
"name": "MariaDB",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 140,
"y": 100,
"wires": [
[
"3ee751a4983f5a2e"
]
]
},
{
"id": "f40f3201baeee9ce",
"type": "inject",
"z": "96b6fe53ebf36e77",
"g": "a40896610389fae2",
"name": "Grafana",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 140,
"y": 240,
"wires": [
[
"c7b35bfaec95e1d1"
]
]
},
{
"id": "3ee751a4983f5a2e",
"type": "template",
"z": "96b6fe53ebf36e77",
"g": "c0d359d0b592b252",
"name": "Code (Query)",
"field": "payload",
"fieldType": "msg",
"format": "python",
"syntax": "plain",
"template": "#!/usr/bin/python\n# -* coding: utf-8 *-\n",
"output": "str",
"x": 300,
"y": 100,
"wires": [
[
"e6615d8c361455a9",
"0fc53b0a40df6a49"
]
]
},
{
"id": "c7b35bfaec95e1d1",
"type": "template",
"z": "96b6fe53ebf36e77",
"g": "a40896610389fae2",
"name": "Code (Library)",
"field": "payload",
"fieldType": "msg",
"format": "python",
"syntax": "plain",
"template": "#!/usr/bin/python\n# -* coding: utf-8 *-\n",
"output": "str",
"x": 300,
"y": 240,
"wires": [
[
"84351d05b56a13fc"
]
]
},
{
"id": "5ea9460a9469f4e2",
"type": "template",
"z": "96b6fe53ebf36e77",
"g": "7e09cce17ec213a7",
"name": "Code (Debug)",
"field": "payload",
"fieldType": "msg",
"format": "python",
"syntax": "plain",
"template": "#!/usr/bin/python\n# -* coding: utf-8 *-\n",
"output": "str",
"x": 300,
"y": 340,
"wires": [
[
"61b1a05939ae26bd"
]
]
}
]





