2013-02-19 2 views

ответ

4

Чрезмерно упрощенная версия того, что я использовал с ОК результаты до сих пор:

Ext.define('desktop.controls.d3svg', { 
extend: 'Ext.container.Container', 
alias: 'widget.d3svg', 

listeners: { 

    added: function() { 

     this.onAdded(); 

    } 

}, 

onAdded: function() { 

    // ext container has the outer and inner containers 
    // use id for selection of inner container for appending svg 
    var svg = d3.select('#' + this.id + '-innerCt').append("svg"); 

    this.svg = svg; 

}, 

onResize: function(width, height) { 

    // on the way to an example of using ext resize event and width 
    // and height vars 
    // this.svg.do_d3_resize_things..... 

} 

}); 
Смежные вопросы