Canvas- Auto-change connection points when connected items are moved

Use case or problem

When you drag items in relation to its connected items, the connection lines can get ‘messy’ (having to pass through items to reach connection points.)

Proposed solution

An option to have Obsidian automatically change connection points based on where items are located in relation to each other. For example, item that is moved from above/right of a connected item to below/left of it will have the connection points changed for the straightest, most direct connection possible (for all connection points of course.)

This could be system-wide, canvas-wide, or separate setting for each item (with ability to set default behavior.)

I am finding Canvas to be a great mind map tool within Obsidian, so being able to frictionlessly work with cards would be great.

Current workaround (optional)

Manually change connection points when you move around items with connections.

7 Likes

I also felt this to be one of the main sources of friction when using canvas to create something from the ground up. The proposed solution is exactly what I thought to be a good solution and it can significantly reduce the friction associated with restructuring a canvas.

Found these to FRs that pretty much cover the same underlying issue.

2 Likes

This method will lead to new problems. What if I want to keep the connection point at a certain location? Sometimes it’s frustrating that the location of the connection can’t be controlled

Yea, I agree. That scenario can be equally frustrating as well. Giving flexibility for the user to select the required behavior through some settings is important. Plus, I think, if the user can tell Obsidian, through some modifier Keys (for example, Alt + move or Ctrl + Shift + move), what type of move the user wants, it can completely solve the problem.

Hi @steveylang, @seabirdr and @liberated_potato

You may be interested in a plugin I wrote yesterday that solves exactly this:

This problem of messy connection lines was a show-stopper for me, but this new plugin helps a lot. It’s not yet available on the official repo, I just filed for it to be included but I don’t know how much time it will take to make it. In the mean time, you can install it using the BRAT plugin.

Cheers!

3 Likes

Yes, thank you. I am planning to try it.

Use case or problem

When creating a new node by dragging from an existing one, the direction of the arrow (and the attachment point) is always in the same direction from which I started the drag. Sometimes I would like to create a node where the arrow comes in from a different direction (and the attachment point is on a different side).

Proposed solution

a. Define modification keys to explicitly specify the direction of the generated arrow (and attachment point on the new node).
b. Automatically switch arrow direction (and attachment points on the new node) depending on relative position.

Current workaround (optional)

Create node, then create connection.

Related feature requests (optional)

1 Like

This sounds the same as this FR Canvas- Auto-change connection points when connected items are moved

And there is this plugin (though I haven’t tried it yet) to solve this New plugin: Optimize Canvas Connections

1 Like

Thank you so much for this! I have only installed plugins from the community repo, but will try this one out soon either way. Cheers!

1 Like

This would be suuuuuper handy for brainstorming in canvas!

Perhaps the most straightforward method I can envision is by adding a fifth anchor node in the middle of the canvas item in addition to the ones on each side. Dragging a connector/line to one of the side nodes would behave as it does now: tying the connector to that specific side. Dragging it to the middle node, on the other hand, would allow the connector to move to whatever side of the item is most optimal as you change the canvas layout.

This “center node” would only be visible when dragging a connector, of course. Or you could have the entire edge of the item turn bold when dragging the end of a connector into interior of the item (as opposed to one of the edges) to indicate that you are connecting it to this auto-adjust node.