davidfig / pixi-scrollbox

a scrollbox built for pixi.js using a masked box that scrolls vertically and/or horizontally with optional scrollbars
https://www.npmjs.com/package/pixi-scrollbox
MIT License
170 stars 33 forks source link

Manually set scroll position? #26

Closed Losses closed 3 years ago

Losses commented 3 years ago

Trying something like:

scrollBox.scrollLeft = 0

But got: Uncaught TypeError: Cannot set property scrollLeft of # which has only a getter

It's weird...

davidfig commented 3 years ago

That's because I didn't have setters for scrollLeft and scrollTop. I added them in v2.2.0. Let me know if you have any problems.

Losses commented 3 years ago

it works! thank you!