yishn / tikzcd-editor

A simple visual editor for creating commutative diagrams.
https://tikzcd.yichuanshen.de/
MIT License
1.86k stars 100 forks source link

Using long labels increases the distance form the label to the arrow #24

Closed StrikeTom closed 6 years ago

StrikeTom commented 6 years ago

When labeling a vertical arrow the text distances itself from the arrow it is attached to. This issue is relatively new.

varkor commented 6 years ago

Illustration: image Link

I imagine this was introduced by this change: https://github.com/yishn/tikzcd-editor/commit/43f0d9d1ec150e043cbdc39d181adcf8b32692f4

yishn commented 6 years ago

Good catch everyone! @Isomorphisme Do you have any idea what's going on? Otherwise, I will take a look this weekend.

Isomorphisme commented 6 years ago

I think I broke something because I don't understand what the 'heightDiff' is. It seems that deleting this little part solves the issue though. I do not have a lot of time to test, but if someone wants, I think that something along the lines of https://github.com/Isomorphisme/tikzcd-editor/commit/52b6c7e81ddb4ac0fcb14742c1bd5943d0b45e69 should work.

yishn commented 6 years ago

Took me a while to figure out what I wrote, but I think I finally got the correct computations... 😅