Last active
September 6, 2015 09:30
-
-
Save AmilKey/9a965d656a3a5959440a to your computer and use it in GitHub Desktop.
updateD3 Ember.js form https://www.youtube.com/watch?v=vvZEddrClAQ&feature=youtu.be
This file contains hidden or 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
| // from https://www.youtube.com/watch?v=vvZEddrClAQ&feature=youtu.be | |
| export default Ember.Component.extend({ | |
| draw(){ | |
| if (this._state !== 'inDOM') return; | |
| let data = this.get('data'); | |
| // do d3 stuff | |
| }, | |
| updateD3: on('didInsertElement', observer('data', function() { | |
| Ember.run.scheduleOnce('render', this, this.draw); | |
| })) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment