this.dispatchEvent({
type: "tm-navigate",
navigateTo: this.actionTo === undefined ? this.getVariable("currentTiddler") : this.actionTo,
navigateFromTitle: this.getVariable("storyTiddler"),
navigateFromNode: triggeringWidget,
navigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
},
navigateSuppressNavigation: true
});
if (document.getElementById(this.uniqueid) != null) {
document.getElementById(this.uniqueid).scrollIntoView();
}
<$button>
<$action-anchor $to="MyTiddler" $id="uniqueid"/>
<$action-anchor $to="MyTiddler" $id="uniqueid"/>
</$button>
document.getElementsByClassName('my-unique-class')[0].dispatchEvent(new MouseEvent('dblclick', {'bubbles': true}))
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywikidev/NcCXnZu-OJE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/20d1c3fb-5f94-427b-a7f5-ca10c27773eb%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to tiddly...@googlegroups.com.
If it helps there is prior work on using anchors in tiddlywiki. It relies on an unconventional use of ##
Regards
Tont
if (document.getElementById(this.uniqueid) != null) {
I am aware of that. However if I recall correctly,
1. it only aids navigation if the link and id exists within same tiddler or
will scroll to id if it is already present in storylist.
2. Need to modify ids to fit its unconventional pattern.
You see, the code given in my original post already solved the issue of
scrolling to an id if it exists in the storylist, without having to modify
ids in any manner. My issue was if the id is not present in the story list,
it takes 2 clicks to achieve the navigation: first to bring tiddler to
storylist, second to scroll.
On 19 September 2019 11:02:41 AM TonyM <anthon...@gmail.com> wrote:
> If it helps there is prior work on using anchors in tiddlywiki. It relies
> on an unconventional use of ##
>
> Regards
> Tont
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "TiddlyWikiDev" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/tiddlywikidev/NcCXnZu-OJE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
document.querySelector("div > p.myclass").scrollIntoView();
val element = document.querySelector("h1[data-anchor=firstlink]");
element.scrollIntoView();
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/8e7a0e06-8b8d-435e-8f32-419fb9e9f81bn%40googlegroups.com.