felixhayashi / TW5-TiddlyMap

Map drawing and topic visualization for your wiki
http://tiddlymap.org
BSD 2-Clause "Simplified" License
845 stars 127 forks source link

[BUG] Weird behavior while edit edge type styling. Can not change the value of edges arrow.from.type. #460

Closed blackwint3r closed 1 month ago

blackwint3r commented 1 month ago

This bug only appears when I changed the arrow.from.type orarrow.middle.type to a non arrow value( circle or bar).

How to reproduce :

截屏2024-08-01 18 02 02

Open edge type manager , go to styling tab, change the value of arrow.from.type to circle, click save.

Either the checkbox of arrow.from is unchecked, or the changes appear to be saved but not taken effect.

flibbles commented 1 month ago

Yeah, I see it. Unfortunately this bug appears to be coming from vis-network, and I know virtually nothing about vis-network, and it doesn't have documentation on its Configurator, which is what Tiddlymap is using to build that dialog.

I don't know how to help you. I don't think it's possible to fix this through Tiddlymap without rewriting the configuration section to not rely on vis-network's built in configuration system.

blackwint3r commented 1 month ago

Looks like I'll have to put up with this minor inconvenience. Anyway, thank you for your explanation.😄

flibbles commented 1 month ago

If it helps at all, you can edit the edge-type tiddlywiki directly and give it the settings you want in the json. That does work.

For instance, an edge type called "to" would have a file like this:

$:/plugins/felixhayashi/tiddlymap/graph/edgeTypes/to

You can edit its style to be {"arrows":{"to":{"enabled":true,"type":"circle"},"middle":{"enabled":false}}} and that'll take effect. The two properties I know of are "type" and "scaleFactor".

Also, it looks like after you type in "circle", and the checkbox unchecks itself, as long as you hit save immediately, the type or scale-factor you just edited will take effect. If you save, close out, and go back in. It'll still look unchecked, but the effect is still there.

Sorry you have to put up with this. TiddlyMap is built upon vis-network, which hasn't had a meaningful update or PR merge in over 5 years. I'd love to make an alternative to TiddlyMap, but every suitable javascript graphing library I can find has already fallen into obsolescence...