extension/frontend/view/Components/right-view/atomView.js
// traverses through D3 tree and if a node includes the h3 inner html tag, that node will light up
traverses through D3 tree and if a node includes the h3 inner html tag, that node will light up
traverses through D3 tree and if a node includes the h3 inner html tag that node will light up
function lightup(e) {
        let atom = e.target.innerHTML
        d3.selectAll('.componentTreeNode').style('fill', originalColor).attr('r', 5)
        d3.select('#canvas').selectAll('.node').each(function (e) {
            if (!e.data.atoms) { }
            else if (e.data.atoms.includes(atom)) {
                d3.select(this).select('.componentTreeNode').transition(t).style('fill', 'rgb(240, 219, 79)').attr('r', 10.5)
            }
        })
        atomValLightup(e);
    }
function lightup ( e ) { let atom = e . target . innerHTML d3 . selectAll ( '.componentTreeNode' ) . style ( 'fill' , originalColor ) . attr ( 'r' , 5 ) d3 . select ( '#canvas' ) . selectAll ( '.node' ) . each ( function ( e ) { if ( ! e . data . atoms ) { } else if ( e . data . atoms . includes ( atom ) ) { d3 . select ( this ) . select ( '.componentTreeNode' ) . transition ( t ) . style ( 'fill' , 'rgb(240, 219, 79)' ) . attr ( 'r' , 10.5 ) } } ) atomValLightup ( e ) ; }
traverses through D3 tree and if a node includes the h3 inner html tag, that node will light up
traverses through D3 tree and if a node includes the h3 inner html tag that node will light up