addon/utils/graph-view.js
function visibilityCheck() {
    var graphBound = g.node().getBoundingClientRect(),
        containerBound = container[0].getBoundingClientRect();

    if(graphBound.right < containerBound.left ||
      graphBound.bottom < containerBound.top ||
      graphBound.left > containerBound.right ||
      graphBound.top > containerBound.bottom) {
        panX = PADDING;
        panY = PADDING;
        scale = 1;
        transform(true);
    }
  }
function visibilityCheck() {
    var graphBound = g.node().getBoundingClientRect(),
        containerBound = container[0].getBoundingClientRect();

    if(graphBound.right < containerBound.left ||
      graphBound.bottom < containerBound.top ||
      graphBound.left > containerBound.right ||
      graphBound.top > containerBound.bottom) {
        panX = PADDING;
        panY = PADDING;
        scale = 1;
        transform(true);
    }
  }
function visibilityCheck ( ) { var graphBound = g . node ( ) . getBoundingClientRect ( ) , containerBound = container [ 0 ] . getBoundingClientRect ( ) ; if ( graphBound . right < containerBound . left || graphBound . bottom < containerBound . top || graphBound . left > containerBound . right || graphBound . top > containerBound . bottom ) { panX = PADDING ; panY = PADDING ; scale = 1 ; transform ( true ) ; } }
Check if the item have moved out of the visible area, and reset if required
Check if the item have moved out of the visible area and reset if required