-
Hi maintainer, thank you for your amazing work. I really love it. Currently I'm developing an app that build on top of your project. I find this to be a little inconvenient, because I need to getScroll (in px), and calculate drag dx (in px), and get the total width (in px), then convert it into percentage, then getDuration( in seconds), then get the time to be set. My workaround for now: function setScrollPx(x: number) {
const scrollEL = el.firstElementChild?.shadowRoot?.querySelector(".scroll");
if( scrollEL ) {
scrollEL.scrollLeft = x;
}
} I checked the source code of getScrollTime api, which essentailly called the privte method setScroll of renderer My point: why don't we just expose this api? I'm currently fine with my workaround. But maybe it could be helpful for others? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Sure, it would be nice to expose a setScroll method. |
Beta Was this translation helpful? Give feedback.
Sure, it would be nice to expose a setScroll method.