<html><head><metacharset="utf-8"><title>干线图</title><scripttype="text/javascript">
mxBasePath ='../src';</script><scripttype="text/javascript"src="../src/js/mxClient.js"></script><scripttype="text/javascript">functionmain(container){
// Checks if the browser is supportedif(!mxClient.isBrowserSupported()){
// Displays an error message if the browser is not supported.
mxUtils.error('Browser is not supported!',200,false);}else{
mxEvent.disableContextMenu(container);//禁用浏览器自带右键// Creates the graph inside the given container 在给定容器内创建图形var graph =newmxGraph(container);// Enables rubberband selection 鼠标框选newmxRubberband(graph);
graph.setEnabled(false);//对图形进行拖拽拉伸等操作
graph.setCellsMovable(false);//禁止拖拽流程图configureStylesheet(graph);
graph.setTooltips(true);//开启提示工具
graph.setConnectable(true);// Installs a custom tooltip for cells
graph.getTooltipForCell=function(cell)//重写提示工具{
if(this.model.isVertex(cell)){
return'rightclick';}}// Installs a