Developer-Mike / obsidian-advanced-canvas

⚡ Supercharge your Obsidian.md canvas experience! Create presentations, flowcharts and more!
GNU General Public License v3.0
365 stars 17 forks source link

[FR] The thickness of the Edge can be adjusted, and the shape of the Edge can be controlled #87

Closed JingofXin closed 4 months ago

JingofXin commented 4 months ago

This plugin is great! The native Obsidian has a problem that is not very friendly: when the Node or group is very large (or the positions of the two Nodes are not suitable), the Edge line will not only look very thin, but also look ugly. I hope this plugin can make up for this shortcoming. Specifically, there are more settings for Edge:

  1. The thickness of the Edge can be adjusted. I hope to give some pre-made thickness options, or set the thickness by numbers.
  2. the shape of the Edge can be controlled. I hope to add control points or Bezier curves to control the shape of the Edge.
Developer-Mike commented 4 months ago
  1. To fix this issue, you can easily add a new style attribute (Tutorial). The css would look something like this:

    .canvas-edges .canvas-display-path[data-<PROPERTY-NAME>="<VALUE>"] {
    /* 24px is the default value */
    stroke-width: calc(24px * var(--zoom-multiplier));
    }
  2. Edge path anchors are a planned feature. But it will take some time before it gets released. (Here is the branch)

JingofXin commented 4 months ago

Thanks a lot, but I have a problem. I followed the example setup, but the color background doesn't take effect.

result: the color background doesn't take effect image

Developer-Mike commented 4 months ago

You need to change the data-datasetKey in your CSS with data-example-style-attribute

JingofXin commented 4 months ago

You need to change the data-datasetKey in your CSS with data-example-style-attribute

Thanks, it works