applyChange_(changes) {
    // (De)select identifier elements in the textual IR.
    for (const change of changes.nodes) {
      if (change.from == selectableGraph.SelectState.SELECTED) {
        document.querySelectorAll(`.ir-node-identifier-${change.id}`)
            .forEach(e => {
              e.classList.remove('ir-node-identifier-selected');
            });
      }
      if (change.to == selectableGraph.SelectState.SELECTED) {
        document.querySelectorAll(`.ir-node-identifier-${change.id}`)
            .forEach(e => {
              e.classList.add('ir-node-identifier-selected');
            });
      }
    }

    if (this.graphView_) {
      this.graphView_.applyChange(changes);
    }
  }
/**
   * Applies the change object as returned by SelectionGraph::computeChanges_
   * to the textual IR and graph. Selects and deselects nodes and edges as well
   * as adds/removes elements if showOnlySelected is set.
   * @param {!selectableGraph.SelectionChangeSet} changes
   * @private
   */
Applies the change object as returned by SelectionGraph::computeChanges_
to the textual IR and graph. Selects and deselects nodes and edges as well
as adds/removes elements if showOnlySelected is set.
Applies the change object as returned by SelectionGraph :: computeChanges_ to the textual IR and graph . Selects and deselects nodes and edges as well as adds / removes elements if showOnlySelected is set .
applyChange_(changes) {
    for (const change of changes.nodes) {
      if (change.from == selectableGraph.SelectState.SELECTED) {
        document.querySelectorAll(`.ir-node-identifier-${change.id}`)
            .forEach(e => {
              e.classList.remove('ir-node-identifier-selected');
            });
      }
      if (change.to == selectableGraph.SelectState.SELECTED) {
        document.querySelectorAll(`.ir-node-identifier-${change.id}`)
            .forEach(e => {
              e.classList.add('ir-node-identifier-selected');
            });
      }
    }
    if (this.graphView_) {
      this.graphView_.applyChange(changes);
    }
  }
applyChange_ ( changes ) { for ( const change of changes . nodes ) { if ( change . from == selectableGraph . SelectState . SELECTED ) { document . querySelectorAll ( ` ${ change . id } ` ) . forEach ( e => { e . classList . remove ( 'ir-node-identifier-selected' ) ; } ) ; } if ( change . to == selectableGraph . SelectState . SELECTED ) { document . querySelectorAll ( ` ${ change . id } ` ) . forEach ( e => { e . classList . add ( 'ir-node-identifier-selected' ) ; } ) ; } } if ( this . graphView_ ) { this . graphView_ . applyChange ( changes ) ; } }
Applies the change object as returned by SelectionGraph::computeChanges_
 to the textual IR and graph.
Applies the change object as returned by SelectionGraph :: computeChanges_ to the textual IR and graph .
// (De)select identifier elements in the textual IR.