--- a/cms/app-client/app/components/playlist-component.js Fri Oct 14 19:58:09 2016 +0200
+++ b/cms/app-client/app/components/playlist-component.js Sat Oct 15 16:15:07 2016 +0530
@@ -20,6 +20,22 @@
}
}).on('init'),
+ playerItemObserver: Ember.observer('player.item', function() {
+ if(this.$() && this.get('player').get('item')) {
+ var ul = this.$().find('ul');
+ var li = this.$().find('li#' + this.get('player').get('item').replace('.', '\\.').replace('/', '\\/'));
+ if(li.offset().top - ul.offset().top < 0) {
+ ul.animate({
+ 'scrollTop': ul.scrollTop() + li.offset().top - ul.offset().top
+ });
+ } else if(li.offset().top + li.outerHeight() - ul.offset().top > ul.outerHeight()) {
+ ul.animate({
+ 'scrollTop': ul.scrollTop() + li.offset().top + li.outerHeight() - ul.offset().top - ul.height()
+ });
+ }
+ }
+ }),
+
init: function() {
this._super(...arguments);
},