p1.x+p5.x)/2;
            p3.x = p5.x - dist; // (p1.x+p5.x)/2;
          }
          r.setPoint(2, p2);
          r.setPoint(3, p3);
          r.commitRoute();
        }
      }
    }
  }
  // end of SideTreeLayout

  // Show the diagram's model in JSON format
  function save() {
    document.getElementById('mySavedModel').value = myDiagram.model.toJson();
    myDiagram.isModified = false;
  }
  function load() {
    myDiagram.model = go.Model.fromJson(document.getElementById('mySavedModel').value);
    //