Skip to content

Instantly share code, notes, and snippets.

@adamjmcgrath
Created August 4, 2016 10:13
Show Gist options
  • Save adamjmcgrath/8a63b77b5c7d407852d202ea34299e69 to your computer and use it in GitHub Desktop.
Save adamjmcgrath/8a63b77b5c7d407852d202ea34299e69 to your computer and use it in GitHub Desktop.
Ember: Observer vs didReceiveAttrs
didRecieveAttrs(attrs) {
if (attrs.newAttrs.dimensions.value !== attrs.oldAttrs.dimensions.value) {
chart.redraw();
}
}
onResize: Ember.observer('dimensions', function() {
chart.redraw();
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment