Open ming-codes opened 8 years ago
{{#data-visual as |stage width height|}} {{#parent-chart select=stage.svg.select.chart as |selection|}} {{child-chart-component select=selection}} {{/parent-chart}} {{/data-visual}}
// parent-chart.js Ember.Component.extend({ call(selection) { this.set('yieldDown', selection.append('g')); } })
// parent-chart.hbs {{yield yieldDown}}
This is expected to work, but it doesn't. Because select= is expecting a selection proxy.
Do this instead.
// parent-chart.js Ember.Component.extend({ call(selection) { selection.append('g').classed('cls'); this.set('yieldDown', this.get('select.cls')); } })
This will make the select proxy correctly wrap the element to yield down.
This is expected to work, but it doesn't. Because select= is expecting a selection proxy.
Do this instead.
This will make the select proxy correctly wrap the element to yield down.