Skip to content

Instantly share code, notes, and snippets.

@fsmanuel
Last active August 29, 2015 14:05
Show Gist options
  • Save fsmanuel/16f5fe57748532b3d47c to your computer and use it in GitHub Desktop.
Save fsmanuel/16f5fe57748532b3d47c to your computer and use it in GitHub Desktop.
component
Ember.ObjectController.create({
createMarker: function() {
var marker = new InfoBox();
var markerView = this.get('container').lookup('component:custom-marker');
markerView.append();
markerView.set('controller', Ember.ObjectController.create({
marker: marker,
settingIcon: settingIcon,
settingSize: settingSize,
settingColor: settingColor,
row: row
}));
Ember.run.scheduleOnce('afterRender', markerView, function() {
var $detached = this.$().detach();
marker.setContent($detached.get(0));
});
}
}
export default Ember.Component.extend({
layoutName: 'components/custom-marker'
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment