caksoylar / keymap-drawer

Visualize keymaps that use advanced features like hold-taps and combos, with automatic parsing
https://caksoylar.github.io/keymap-drawer
MIT License
641 stars 57 forks source link

View is cut off when combo description is offset #70

Closed anarion80 closed 6 months ago

anarion80 commented 7 months ago

I have my combo offset like this:

 zmk_combos:
    combo_mouse:
      align: top
      offset: 0.4

and the resulting SVG is cut off at the top: obraz

Is there a way to calculate the viewBox correctly with this or at least add some manual offset?

caksoylar commented 7 months ago

This should be working correctly as of 0.13.0 since viewbox calculation includes combo box offsets. Can you share the exact config+yaml to reproduce this?

anarion80 commented 7 months ago

https://github.com/anarion80/zmk-config-corneish-zen

version is 0.13.1

caksoylar commented 7 months ago

Oh, you have no padding outer_pad_h. The viewbox doesn't consider the size of the combo box itself, hence it is cutting off right at the middle. I figured there would be some padding so it wouldn't be an issue.

I'll see if I can adjust it without causing extra padding for anyone else.

anarion80 commented 7 months ago

Ok, this is not critical, I can use default outer pad values as well.