keen-slider
keen-slider copied to clipboard
slider.update() doesn't position new element if children length stays the same
Adding new elements and calling update()
properly positions the new slide/element. But replacing an element somehow doesn't, no transformation will be applied to the new child.
After investigating I found this check, which might be the problem, since the length is not changing - calling slider.update(slider.options)
works as a workaround - it this intended?
https://github.com/rcbyr/keen-slider/blob/1b2f10817352b3964f262722d7311753ff2c6e38/src/plugins/web/web.ts#L140
Hello @timfuhrmann
I think that could be optimized. Thanks for pointing it out.