UNPKG

rm-components

Version:

The default blueprint for ember-cli addons.

41 lines (31 loc) 1.47 kB
import Ember from 'ember'; import layout from './template'; import previewPlumbing from '../../mixins/rm-preview-plumbing'; export default Ember.Component.extend(previewPlumbing, { layout, didInsertElement() { // this.addObserver('primaryColor', this, this.setPrimaryColorSVG); // this.addObserver('appName', this, this.updateAppName); // this.addObserver('organizationName', this, this.updateOrganizationName); // this.addObserver('dashboardPage', this, this.showDashboardPage); // this.addObserver('iPhonePage', this, this.showPhonePage); this.addObserver('stageArrangement', this, this.arrangeStage); }, willDestroyElement() { // this.removeObserver('primaryColor', this, this.setPrimaryColorSVG); // this.removeObserver('appName', this, this.appName); // this.removeObserver('organizationName', this, this.updateOrganizationName); // this.removeObserver('dashboardPage', this, this.showDashboardPage); // this.removeObserver('iPhonePage', this, this.showPhonePage); this.removeObserver('stageArrangement', this, this.arrangeStage); }, arrangeStage() { let $store = this.$('.store__stage'); $store .removeClass('store__stage--iphoneZoomed') .removeClass('store__stage--iphoneFocused') .removeClass('store__stage--dashboardZoomed') .removeClass('store__stage--cta'); $store.addClass(this.get('stageArrangement') || this.get('defaults.stageArrangement')); } });