vendredi 9 octobre 2020

Ember.js Change scrollbar position to match current item

So, I have a container that overflows in my component. Each item in the container references a clip to be played above. The component automatically moves through each item, playing them sequentially. However when it moves to the overflowed items, it just continues with the scroll bar staying at the default farmost left position. Is there a clean way to move the scroll bar over when a non-visible item is selected?

<div class="scroller" >
    
         <div role="button" class="thumbnail" >
             <img src= />
         </div>
     
</div>

For context a separate component is used and passed the current item to display it above this horizontal scroll bar. I want to be able to check if the current item is not visible, and if so then get its position in the scroll bar and move the scroll position to the item's position.




Aucun commentaire:

Enregistrer un commentaire