obsidian-floating-toc-plugin icon indicating copy to clipboard operation
obsidian-floating-toc-plugin copied to clipboard

Problem with tracking

Open macrospecter opened this issue 10 months ago • 2 comments

I love the floating TOC! Thanks for making it. However, it's often confusing to use because the tracking while scrolling is, for me, off. Two indicator line colors change while scrolling through a note, a darker one and a colored one. The darker indicator line corresponds to a header section that is not in my window at all (the one just out of view above the window), and the colored indicator line corresponds to the header section that is at the top of my window, even if the header itself is out of view. (Screenshot attached.) I don't mind the colored one. But the darker indicator line is very confusing because I'm not sure what it's supposed to indicate. Is there any way to just eliminate that, in both the closed and open TOC views? Or could I change it to correspond to the topmost actual heading that appears in my window, if any, after the topmost heading section? Thanks!

Screenshot 2024-03-27 at 10 27 26 AM

macrospecter avatar Mar 27 '24 17:03 macrospecter

Actually, I didn't have the logic for the darker lines. It's probably something to do with the style, use the following snippet to see if it solves your problem.

li.heading-list-item .line-wrap .line {
    margin-top: 2px;
}

cumany avatar Apr 07 '24 01:04 cumany

Thanks! Unfortunately I don't think that does anything for me other than move the TOC up a half centimeter or so. However, I think I figured out that the dark lines are just tracking the top level header, when there is more than one level. Most of my notes only use one header level, so that wasn't clear before. If there's just one header level, then the dark line seems to bounce around in a pattern I'm not sure about.

However, I have another problem now that seems more pressing: the TOC is now lagging. The TOC from the prior note will stick on screen until another note with a TOC pops up. A lot of my notes contain no headers at all, so I always have this phantom TOC from another note hanging around. Is there any way to stop this? Usually it will be clear if I stop/restart the TOC plugin or quit/restart Obsidian, but of course I don't want to do that each time.

Thanks again for your help!

macrospecter avatar Apr 07 '24 16:04 macrospecter