Lines Matching refs:graph

17 		var graph = ui.editor.graph;
19 if (graph.model.isVertex(graph.getSelectionCell()))
30 var sourceGraph = ui.editor.graph;
91 var graph = new Graph(container);
92 graph.keepEdgesInBackground = true;
93 graph.isCellResizable = function()
98 graph.isCellRotatable = function()
104 graph.getCursorForCell = function(cell)
114 graph.getFoldingImage = function()
132 graph.setEnabled(false);
135 graph.click = function(me)
140 if (cell != null && cell != graph.rootCell)
142 load(graph, cell);
148 var parent = graph.getDefaultParent();
150 var cx = graph.container.scrollWidth / 2;
151 var cy = graph.container.scrollHeight / 3;
153 graph.model.beginUpdate();
154 var cell = graph.importCells([selectionCell])[0];
158 graph.model.endUpdate();
161 graph.getModel().addListener(mxEvent.CHANGE, function(sender, evt)
166 graph.labelsVisible = false;
168 mxEffects.animateChanges(graph, changes, function()
171 graph.labelsVisible = true;
172 graph.refresh();
173 graph.tooltipHandler.hide();
177 load(graph, cell);
184 function load(graph, cell) argument
186 if (graph.getModel().isVertex(cell))
188 var cx = graph.container.scrollWidth / 2;
189 var cy = graph.container.scrollHeight / 3;
193 var parent = graph.getDefaultParent();
194 graph.rootCell = cell.referenceCell || cell;
197 graph.getModel().beginUpdate();
200 var cells = rootChanged(graph, cell);
203 for (var key in graph.getModel().cells)
205 var tmp = graph.getModel().getCell(key);
207 if (tmp != graph.rootCell && graph.getModel().isVertex(tmp))
209 graph.removeCells([tmp]);
215 graph.addCells(cells);
218 var geo = graph.getModel().getGeometry(graph.rootCell);
226 graph.getModel().setGeometry(graph.rootCell, geo);
235 for (var key in graph.getModel().cells)
237 var tmp = graph.getModel().getCell(key);
239 if (tmp != graph.rootCell && graph.getModel().isVertex(tmp) &&
240 graph.getModel().getParent(tmp) == graph.getDefaultParent())
247 var geo = graph.getModel().getGeometry(tmp);
260 var r = Math.min(graph.container.scrollWidth / 3 - 80,
261 graph.container.scrollHeight / 3 - 80);
265 var geo = graph.getModel().getGeometry(vertices[i]);
273 graph.getModel().setGeometry(vertices[i], geo);
278 var layout = new mxParallelEdgeLayout(graph);
280 layout.execute(graph.getDefaultParent());
285 graph.getModel().endUpdate();
291 function rootChanged(graph, cell) argument
308 var clones = graph.cloneCells(cells);
317 if (graph.model.isEdge(clones[i]))
330 var backCell = graph.createVertex(null, null, 'Back...', 0, 0, 80, 30, btnStyle);
338 var moreCell = graph.createVertex(null, null, 'More...', 0, 0, 80, 30, btnStyle);
353 exploreFromHere(ui.editor.graph.getSelectionCell());
359 ui.editor.graph.click = function(me)
361 if (ui.editor.graph.model.isVertex(me.getCell()) &&
362 ui.editor.graph.model.getEdgeCount(me.getCell()) > 0 &&