ycnmhd / obsidian-lineage

Gingko-like interface in obsidian
MIT License
70 stars 6 forks source link

view vertically centers incorrectly while zooming if lineage interface opened in a lower pane #60

Open cheezopath opened 2 weeks ago

cheezopath commented 2 weeks ago

Are you using the latest version of the plugin?

Have you checked for similar issues?

What happened?

if I have a vertical split in my workspace and open lineage view on a lower or non-top aligned pane, the vertical align of the active card is offset too high

What did you expect to happen?

active card element to be centred in the pane. likely an absolute value/offset issue

Relevant console output

No response

Obsidian version

1.6.5

OS

Windows

ycnmhd commented 2 weeks ago

Can you provide a screenshot of the issue?

cheezopath commented 2 weeks ago

image

in the screenshot I scrolled up a little in the lower pane to show that the card is present but higher up. at first it's all the way offscreen

ycnmhd commented 2 weeks ago

Does the issue persist when the zoom is set to 1 (no zoom)?

cheezopath commented 2 weeks ago

yep!

cheezopath commented 2 weeks ago

whoops sorry misclicked close....

ycnmhd commented 2 weeks ago

I can't reproduce this issue (unless zoom is not set to 1) 2024-07-04_13-13-54

cheezopath commented 2 weeks ago

tried in a new vault. I think something to do with the order of opening/window splitting has an impact on the behaviour but can't pin it down exactly yet

https://github.com/ycnmhd/obsidian-lineage/assets/8531235/159eb08b-77c3-46b4-a132-d41b023b1213

cheezopath commented 2 weeks ago

sorry just spotted that this wasnt at zoom zero. when i retry after selecting reset zoom in the interface it started working again. weird as I am almost certain i didnt change zoom level when making the new vault. maybe I had selected fit? Things do break at non default zoom as you say