addon/utils/graph-view.js
function (component, element, data) {
    var svg = d3.select(element).select('svg');

    _component = component;
    _data = data;
    _g = svg.append('g').attr('transform', `translate(${PADDING},${PADDING})`);
    _svg = Ember.$(svg.node());
    _tip = Tip;

    _tip.init(Ember.$(element).find('.tool-tip'), _svg);

    _treeData = data.tree;
    _treeData.x0 = 0;
    _treeData.y0 = 0;

    _panZoom = _attachPanZoom(_svg, _g, element);

    _setLayout(LAYOUTS.topToBottom);
  }
function (component, element, data) {
    var svg = d3.select(element).select('svg');

    _component = component;
    _data = data;
    _g = svg.append('g').attr('transform', `translate(${PADDING},${PADDING})`);
    _svg = Ember.$(svg.node());
    _tip = Tip;

    _tip.init(Ember.$(element).find('.tool-tip'), _svg);

    _treeData = data.tree;
    _treeData.x0 = 0;
    _treeData.y0 = 0;

    _panZoom = _attachPanZoom(_svg, _g, element);

    _setLayout(LAYOUTS.topToBottom);
  }
function ( component , element , data ) { var svg = d3 . select ( element ) . select ( 'svg' ) ; _component = component ; _data = data ; _g = svg . append ( 'g' ) . attr ( 'transform' , ` ${ PADDING } ${ PADDING } ` ) ; _svg = Ember . $ ( svg . node ( ) ) ; _tip = Tip ; _tip . init ( Ember . $ ( element ) . find ( '.tool-tip' ) , _svg ) ; _treeData = data . tree ; _treeData . x0 = 0 ; _treeData . y0 = 0 ; _panZoom = _attachPanZoom ( _svg , _g , element ) ; _setLayout ( LAYOUTS . topToBottom ) ; }
Creates a DAG view in the given element based on the data
@param component {DagViewComponent} Parent ember component, to sendAction
@param element {HTML DOM Element} HTML element in which the view will be created
@param data {Object} Created by data processor
Creates a DAG view in the given element based on the data