Sorry - brain overload
I was swapping around so much between here and my editor and the settings menu and what constitues "align" that I'd forgotten who was on first!
Sorry - brain overload
I was swapping around so much between here and my editor and the settings menu and what constitues "align" that I'd forgotten who was on first!
Looks nice to me
Ahh - so this is with a non-default grid size to begin with. So yes, it width snapping is hardcoded to units of 20 (the default grid size). I remember now I didn't want to just use the grid size because if someone sets the grid to something big, like 100, then their nodes would get huge.
FTAOD
I'm talking about how NR behaves with default settings - Dave is the one who suggested changing grid size
I'm talking about how NR behaves with default settings - Dave is the one who suggested changing grid size
Maybe originally - and we established that was due to the compact nodes being square and not aligning to the grid on both edges.
But your reply from an hour ago, shows the regular nodes don't adjust their width to align both edges for non-default grid width. Alignment when snapping to grid - #35 by cymplecy
indeed - fixing that - but maybe limiting to gridSizes up to 50 ? - would then improve matters. (even if we decline to change the default)
Raised PR - set node width dependent on gridsize by dceejay · Pull Request #3256 · node-red/node-red · GitHub to try to improve matters.
@dceejay blame you for pointing me down this path
Dare you to change that to your Christmas cards for this year Dave!
I think we've got a brand new game!
Hate to admit it -- but this has always bugged me, too!
The reason that the input-side wire is longer than the output-side wire (in original example #1), is simply because the square link nodes are always aligned to the grid on the left edge of the link node. If this was mentioned somewhere in this looong thread, my apologies for missing it!
In my opinion, the link in
node (and every square node that ONLY has an output port) should be right-aligned with the grid. In other words, make sure that ports with connected wires always align with the grid -- the only exception would be square nodes that have both input and output ports, since the square representation cannot have both edges fall on a default (20 px) grid line.
At least Simon and I would be happy... can this behavior be added to the new PR, please?
Fascinating -- now if only the icons were little beers...
I'm sure you're still wading through the 50+ replies in this thread, but I do suggest something similar somewhere in amongst the rest.
Ah, thanks Nick - not sure how I missed that the first time... I guess what I'm asking is if the right-edge alignment be the default for nodes without any input ports? So dragging/dropping will just "do the right thing", so to speak.
BTW, @cymplecy -- if you really cannot wait for this "enhancement", you can always select the link in
nodes and use ctrl-right-arrow
10 times to bump them into "proper" alignment
These are real variations I'm currently playing with
I think the bottom one with nodes touching is "legitimate" in the circumstances of a simple linear flow but I think I'll only use it when space is REALLY tight
One of advantages of this approach is that the individual node labels can be very descriptive, without taking up screen space
So you don't lose inline documentation when you back to it in 12 months time
Could always use a subflow, if minimalist is your goal...
Just remember Nick's warning. Forget a wire in that and you will be cursing yourself for a week before you realise what you did.
Good point
But I'm only doing this when I've finished fifing and faffing around and tidying up
But I'll try and not do it as it will bite me one day and then there will be a lot of "We told you so"
... you can be sure of that