felixhayashi / TW5-TiddlyMap

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

Floating and Non-Floating Nodes in the same View #381

Closed samuelwiechmann closed 1 year ago

samuelwiechmann commented 4 years ago

Okay, I don't know if this is easily possible, but it would be incredibly nice. Imagine to be able to set up nodes in a circle and then have all the connections in the middle float freely! Or of course any other structure that is then surrounded by free floating nodes.

As I understand, right now I can only set floating or not floating nodes on a view basis.

My wish would be to set that property for each node and / or for node-type.

Another maybe easier possibility might be to enable the raster while having nodes float. But right now it seems that the raster doesn't work when floating nodes are enabled.

flibbles commented 2 years ago

Actually, this is totally possible. I've implemented it in the new release. Just uncheck the "physics" option for the nodes or node-types you don't want floating around.

samuelwiechmann commented 2 years ago

That sounds pretty amazing! Maybe a stupid question, but how do I install the new release in a standalone TW?

On Sat, Sep 10, 2022 at 5:58 AM Cameron Fischer @.***> wrote:

Actually, this is totally possible. I've implemented it in the new release. Just uncheck the "physics" option for the nodes or node-types you don't want floating around.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242612530, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNUCAMY74C5IF2VSDWTV5QBNVANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>

flibbles commented 2 years ago

Not stupid at all. It's trickier to do since I have no power to update the demo website.

  1. Go to the github "Code" tab.
  2. On the right you'll see "Releases", the current being v0.17.13. Click it.
  3. In the "Assets", click on the "tiddlymap_0.17.13+10017.json. Dowload it, and drag the file onto your standalone TW.

OR

  1. Click this link and drag the downloaded file onto your standalone TW.

If you notice that the color of the graph buttons are a mis-match of black and green, that means you should (but don't need) to also switch over to the new vis-networ.

You may be the first person who I know for sure will be using the new non-felix release. If you encounter problems, please let me know. I'm not as avid a developer on TiddlyMap, but I would like my non-felix release to work correctly.

samuelwiechmann commented 2 years ago

Hey Cameron,

Thank you for your help! That's exactly what I tried, and in my TW that's hosted on GitHub pages and updated through GitHub-Saver I get: "JSON error: SyntaxError: Unexpected end of JSON input" in the Import Tiddler.

If I open the wiki locally from my drive in my browser and add the file, save and reload, I get: "Uncaught TypeError: Cannot read properties of undefined (reading 'addNode') " (Same goes for the TiddlyMap Demo Site)

It might also be a browser issue as I'm using Opera.. I'll try in Firefox. In Firefox and with an Empty TW I get: "TypeError: locale is undefined"

Oh and when I drag your link into TW, I import "Untitled", a Tiddler that contains the link to the JSON file.

All the best

Samuel

On Sat, Sep 10, 2022 at 3:34 PM Cameron Fischer @.***> wrote:

Not stupid at all. It's trickier to do since I have no power to update the demo website.

  1. Go to the github "Code" tab.
  2. On the right you'll see "Releases", the current being v0.17.13. Click it.
  3. In the "Assets", click on the "tiddlymap_0.17.13+10017.json. Dowload it, and drag the file onto your standalone TW.

OR

  1. Click this link https://github.com/felixhayashi/TW5-TiddlyMap/releases/download/v0.17.13/tiddlymap_0.17.13+10017.json and drag the downloaded file onto your standalone TW.

If you notice that the color of the graph buttons are a mis-match of black and green, that means you should (but don't need) to also switch over to the new vis-networ https://github.com/flibbles/tw5-vis-network.

You may be the first person who I know for sure will be using the new non-felix release. If you encounter problems, please let me know. I'm not as avid a developer on TiddlyMap, but I would like my non-felix release to work correctly.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242730133, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNRZHXCA3E2BWLGSZH3V5SE4VANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>

flibbles commented 2 years ago

Okay, the "TypeError: locale is undefined" was a careless mistake on my part. I thought I tested thoroughly enough, but I hadn't, and my backward compatibility to the old vis.js library was faulty. v0.17.14 has this fixed. (I hope this fixes both issues, but I guess we'll see.)

Here's a link to it. You need to make sure you download this file, and then drag the file over. Unlike in the demo site, I can't get literal dragging of links to work here.

samuelwiechmann commented 2 years ago

Wow, it works! I'll check on my old TW instances where it would be most interesting.

On Sat, Sep 10, 2022 at 4:40 PM Cameron Fischer @.***> wrote:

Okay, the "TypeError: locale is undefined" was a careless mistake on my part. I thought I tested thoroughly enough, but I hadn't, and my backward compatibility to the old vis.js library was faulty. v0.17.14 has this fixed. (I hope this fixes both issues, but I guess we'll see.)

Here's a link to it https://github.com/felixhayashi/TW5-TiddlyMap/releases/download/v0.17.14/tiddlymap_0.17.14+10018.json. You need to make sure you download this file, and then drag the file over. Unlike in the demo site, I can't get literal dragging of links to work here.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242744233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNWPDWAS5XRE4TZKDYTV5SMWXANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>

flibbles commented 2 years ago

No worries. Thanks for helping me get the latest version ready.

samuelwiechmann commented 2 years ago

It's actually amazing! I can simply go into my node types and deactivate physics for the highest level nodes in the graph so I can rearrange them! I'm testing the new version of TiddlyMap on a local copy of: https://samuelwiechmann.github.io/understand2/# I've deactivated physics for nodes with tag:0, tag:1 and tag:2 and started re-arranging them, but as soon as I switch the view, add an edge, or change anything else to the graph, they all realign based on physics.

On Sat, Sep 10, 2022 at 6:29 PM Cameron Fischer @.***> wrote:

No worries. Thanks for helping me get the latest version ready.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242763372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNQPEMXBRXR3T2SA4DTV5SZMZANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>

samuelwiechmann commented 2 years ago

Is there any way to make the nodes permanently "stick" to their location?

On Sat, Sep 10, 2022 at 11:35 PM Samuel Wiechmann < @.***> wrote:

It's actually amazing! I can simply go into my node types and deactivate physics for the highest level nodes in the graph so I can rearrange them! I'm testing the new version of TiddlyMap on a local copy of: https://samuelwiechmann.github.io/understand2/# I've deactivated physics for nodes with tag:0, tag:1 and tag:2 and started re-arranging them, but as soon as I switch the view, add an edge, or change anything else to the graph, they all realign based on physics.

On Sat, Sep 10, 2022 at 6:29 PM Cameron Fischer @.***> wrote:

No worries. Thanks for helping me get the latest version ready.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242763372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNQPEMXBRXR3T2SA4DTV5SZMZANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>

flibbles commented 2 years ago

Oh yeah. I hadn't noticed that. Looks like if you...

  1. turn off floating nodes on your view.
  2. Position your "fixed" nodes.
  3. turn floating nodes back on.

The nodes will be committed to where you left them. TiddlyMap doesn't appear to bother saving node locations when floating nodes is turned on, which makes sense. I'll have to go through and fix that, which will actually be more involved than enabling configurable physics was.

Hopefully my workaround will suit your needs in the time being.

samuelwiechmann commented 2 years ago

Hmm, it's quite nice to have the remaining nodes float freely when repositioning the others. But with a slight variation, your workaround still works for me:

  1. position "fixed" nodes
  2. turn off floating nodes on view
  3. make changes to graph
  4. turn on floating nodes back

Thanks a lot for your work and your advice! It makes TiddlyMap so much better!

On Sat, Sep 10, 2022 at 11:48 PM Cameron Fischer @.***> wrote:

Oh yeah. I hadn't noticed that. Looks like if you...

  1. turn off floating nodes on your view.
  2. Position your "fixed" nodes.
  3. turn floating nodes back on.

The nodes will be committed to where you left them. TiddlyMap doesn't appear to bother saving node locations when floating nodes is turned on, which makes sense. I'll have to go through and fix that, which will actually be more involved than enabling configurable physics was.

Hopefully my workaround will suit your needs in the time being.

— Reply to this email directly, view it on GitHub https://github.com/felixhayashi/TW5-TiddlyMap/issues/381#issuecomment-1242809499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI22MNTGDZP3BX4DELIPJRTV5T63JANCNFSM4TWMCUDA . You are receiving this because you authored the thread.Message ID: @.***>