Created
August 4, 2016 10:13
-
-
Save adamjmcgrath/8a63b77b5c7d407852d202ea34299e69 to your computer and use it in GitHub Desktop.
Ember: Observer vs didReceiveAttrs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
didRecieveAttrs(attrs) { | |
if (attrs.newAttrs.dimensions.value !== attrs.oldAttrs.dimensions.value) { | |
chart.redraw(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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