ITADN

Consider limiting the max html width of a slider when slicing tensors

#62Openmeditans 创建于 2025-04-21
M
meditanscommented
Thanks again for this library, it is a joy to use (especially with penzai's named arrays). I have a small quality of life fix I corrected locally, and would suggest to backport upstream: When slicing a tensor, the html length of the slider is currently calculated (in `arrayviz.js`) as: ```js slider.style.width = `calc(max(40ch, ${size}px))`; ``` but this means that if that dimension along which you're slicing is high (in my example it represents time for about ~25000 steps), you have to scroll laterally to interact with the bar. I suggest a maximum size for the bar, like: ```js slider.style.width = `calc(min(500px, max(40ch, ${size}px)))`; ``` Thanks again!
0 条评论