disable snap to integer spacing in Numbered Rack Cabinet

521 views
Skip to first unread message

Marcel Post

unread,
May 12, 2021, 8:11:06 PM5/12/21
to diagrams.net Q&A

I've been using the 'Numbered Rack Cabinet' diagram to replicate in a diagram what our real server room cabinet looks like. It is super-handy that you can just stretch the shape and it will add more RU's and number them.

I have a few components in the server rack that are not placed at integer values of 1U (1.75-inch) intervals. However, the draw.io Numbered Rack Cabinet diagram defaults to 'snap' new objects to 1U intervals.

Is there a way to turn this off so I can place object in-between? A horizontal snap would still be handy, but the vertical snap is making it difficult to resemble the actual rack's layout.

I looked at the diagram properties and experimented with 'Edit Style', 'Arrange' options, 'Edit Diagram' and all the 'Style - Property/value' pairs, but I don't exactly know what I'm doing and nothing stands out to control the vertical constraint snapping behaviour.

Not sure if there is a deeper level of code that I need to get access to in order to make it do what I want.

Any suggestions?

marija...@gmail.com

unread,
May 13, 2021, 5:42:02 AM5/13/21
to diagrams.net Q&A
Hi,

You could try the following but note that this might have some consequences because it is not something which is done usually.
Select Numbered cabinet shape, click Ctrl+e (Cmd+e) and remove childLayout=rack;

Hopefully, I understood your needs correctly.

Regards,

Marcel Post

unread,
May 13, 2021, 8:22:19 PM5/13/21
to diagrams.net Q&A
Thanks for the suggestion.

It does work but it has a few gotchas:
- changing the width of the rack later on doesn't auto-increase all the child objects inside (servers, switches, patch panels, etc..)
- re-inserting the 'childLayout=rack' re-seats the midway placement of child objects to an integer RU value again

I guess I can live with this for now, but if I wanted to do my own development of a 'rack' library like this, what would be the path? Is there a specific IDE and programming language for this? I should probably ask this in a separate question..

Cheers,
marcel
Reply all
Reply to author
Forward
0 new messages