Skip to content

Instantly share code, notes, and snippets.

@James1x0
Created October 9, 2014 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save James1x0/76a68e5be319abc66d72 to your computer and use it in GitHub Desktop.
Save James1x0/76a68e5be319abc66d72 to your computer and use it in GitHub Desktop.
Computed draw call
import Ember from 'ember';
export default Ember.Component.extend({
didInsertElement: function () {
this._draw();
},
dataset: function () {
// Calulate dataset
return dataset;
}.property('arrayProperty.@each', 'anotherProperty'),
needsRedraw: function () {
this._draw();
}.observes('dataset'), // Have tried dataset.@each
_draw: function () {
var dataset = this.get('dataset');
// Draw stuff with dataset
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment