Felix,

Would there be someway to make this api accessible through a widget or 
macro so we need not enter the javascript realm to do this?

This has in part being why I shied away from the fantastic tiddlymap 
because I am always building my own bespoke data structures and until I can 
transfer these into tiddlymap using methods I understand I am not keen to 
manually move data into tiddlymap representations. TiddlyMap is a key 
visualisation tool for TiddlyWiki so thanks for your work, but for some 
their is still a barrier to adoption, which I doubt would be hard for you 
to remove.

I can imagine the ability to take a toc or tags structure and convert it to 
a tiddlymap either with a default connector, or one based on another tag or 
field value.

Regards
Tony

On Saturday, November 24, 2018 at 11:37:39 PM UTC+11, Felix Küppers wrote:
>
> Hi Justin,
>
> what Tony says is correct and this is truly the power of TiddlyWiki that 
> you can influence the behaviour of other plugins by simply updating the 
> field values that the plugin uses or depends on.
>
> However in case of TiddlyMap, there is also a simple API you can use to 
> programmatically create connections:
>
> See my comment here: 
> https://github.com/felixhayashi/TW5-TiddlyMap/issues/292#issuecomment-408828495
>
> Also see this code: 
> https://github.com/felixhayashi/TW5-TiddlyMap/blob/master/src/plugins/felixhayashi/tiddlymap/js/widget/MapWidget.js#L254
>
>
>         const view = $tm.misc.defaultViewLabel;
>
>         const n1 = $tm.adapter.insertNode({ label: 'Have fun with', x: 0, y: 
> 0 }, view);
>         const n2 = $tm.adapter.insertNode({ label: 'TiddlyMap!!', x: 100, y: 
> 100 }, view);
>
>         $tm.adapter.insertEdge({ from: n1.id, to: n2.id });
>
>
> Hope this helps
>
> Best wishes
>
>
> On 11/24/18 3:33 AM, TonyM wrote:
>
> Justin,
>
> I am not so familiar with tiddlymap but by creating an edge in the map 
> from one tiddler to another I can see that the field tmap.edges: is updated 
> in the tiddler with reference to tmap.id: of the tiddler it connects to 
> and with the relationship name.
>
> As with almost anything in tiddlywiki you can reverse engineer a solution, 
> then build your own connecting methods to almost any plugin or solution out 
> there. Of course someone may have done something similar before and be able 
> to push you forward. 
>
> In this case it would be a matter of simply understanding the format to 
> use and updating a given tiddlers tmap.edges field as required. 
>
> An important fact is that even if you build a process to update multiple 
> tiddlers with edge definitions you will still need to trigger this with a 
> button.
>
> Best of luck
> Tony
>
> On Saturday, November 24, 2018 at 11:22:21 AM UTC+11, Justin B wrote: 
>>
>> Hello lovely Tiddler Touters, 
>>
>> I was wondering if anyone was familiar enough with Tiddlymap to know of a 
>> way to programmatically generate connections between tiddlers. I am looking 
>> for a way where I can select a to, from, and connection type tiddler from 
>> drop-downs and then add the new connection with a button mimicking the 
>> functionality of the "Add Edge" button in the map view. 
>>
>> Thanks,
>>
>> Justin
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/7af1c895-a0e6-4ac8-9816-34b9f414f5dd%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/7af1c895-a0e6-4ac8-9816-34b9f414f5dd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/44e40e2f-2b62-478d-981b-73e046117dca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to