ember-arcgis-page-layout
Version:
Page Layout infrastructure components
23 lines (20 loc) • 772 B
JavaScript
import Ember from 'ember';
import getSectionStyle from '../utils/get-section-style';
export default Ember.Mixin.create({
/**
* Choose the container class name basd on the
* containment property of the section
*/
containerClass: Ember.computed('model.containment', function(){
let containment = this.get('model.containment');
return ( containment === 'fixed') ? 'container' : 'container-fluid';
}),
/**
* compute style from a hash
*/
attributeBindings: ['style'],
style: Ember.computed('model.style.color', 'model.style.background.color', 'model.style.background.image', 'model.style.background.darken', function(){
const style = getSectionStyle(this.get('model.style'));
return new Ember.Handlebars.SafeString(style);
})
});