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]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[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/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/AM6PR05MB558717AF720188B45861EC40CED50%40AM6PR05MB5587.eurprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to