wavedrom icon indicating copy to clipboard operation
wavedrom copied to clipboard

label rect calculation for arcs

Open wallento opened this issue 6 years ago • 0 comments

Hi, I am wondering about this: https://github.com/wavedrom/wavedrom/blob/master/lib/render-label.js#L12 This is supposed to be w/2, but implicitly casts to int. Hence, the rect is not centered, but a bit offset due to the rounding error. For the sake of cleanness it should probably better be

        x: -(w/2),

Best, Stefan

wallento avatar Sep 02 '19 13:09 wallento