mirror of https://github.com/rancher/ui.git
16 lines
435 B
JavaScript
16 lines
435 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.View.extend({
|
|
didInsertElement: function() {
|
|
this._super();
|
|
|
|
var numDrivers = this.get('context.drivers').filter((driver) => {
|
|
return Ember.get(driver,'available');
|
|
}).length;
|
|
|
|
var width = this.$('#providers LI').width();
|
|
this.$('#providers').css('margin','0 auto');
|
|
this.$('#providers').css('max-width', Math.min(numDrivers, 6) * width + 'px');
|
|
}
|
|
});
|