Lines Matching refs:graph

47 	var graph = ui.editor.graph;
48 var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
64 'cells', [graph.cellEditor.getEditingCell()]));
67 graph.updateLabelElements(graph.getSelectionCells(), function(elt)
74 graph.replaceElement(elt, 'div');
123 if (graph.cellEditor.textarea != null)
125 graph.cellEditor.textarea.focus();
158 if (graph.cellEditor.textarea != null)
166 var elts = graph.cellEditor.textarea.getElementsByTagName('font');
182 'cells', [graph.cellEditor.getEditingCell()]));
235 if (selState != null && graph.cellEditor.textarea != null)
237 graph.cellEditor.textarea.focus();
238 graph.cellEditor.restoreSelection(selState);
248 selState = graph.cellEditor.saveSelection();
255 …menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE…
256 …menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE…
261 …menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_L…
262 …menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENT…
263 …menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_…
265 …menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TO…
266 …menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDD…
267 …menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN…
271 …menu.addItem(mxResources.get('horizontal'), null, function() { graph.distributeCells(true); }, par…
272 …menu.addItem(mxResources.get('vertical'), null, function() { graph.distributeCells(false); }, pare…
276 var state = graph.view.getState(graph.getSelectionCell());
321 var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
325 var selectionCells = graph.getSelectionCells();
326 layout.execute(graph.getDefaultParent(), selectionCells.length == 0 ? null : selectionCells);
331 var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
335 var selectionCells = graph.getSelectionCells();
336 layout.execute(graph.getDefaultParent(), selectionCells.length == 0 ? null : selectionCells);
342 var tmp = graph.getSelectionCell();
345 if (tmp == null || graph.getModel().getChildCount(tmp) == 0)
347 if (graph.getModel().getEdgeCount(tmp) == 0)
349 roots = graph.findTreeRoots(graph.getDefaultParent());
354 roots = graph.findTreeRoots(tmp);
364 var layout = new mxCompactTreeLayout(graph, true);
374 layout.execute(graph.getDefaultParent(), tmp);
381 var tmp = graph.getSelectionCell();
384 if (tmp == null || graph.getModel().getChildCount(tmp) == 0)
386 if (graph.getModel().getEdgeCount(tmp) == 0)
388 roots = graph.findTreeRoots(graph.getDefaultParent());
393 roots = graph.findTreeRoots(tmp);
403 var layout = new mxCompactTreeLayout(graph, false);
413 layout.execute(graph.getDefaultParent(), tmp);
420 var tmp = graph.getSelectionCell();
423 if (tmp == null || graph.getModel().getChildCount(tmp) == 0)
425 if (graph.getModel().getEdgeCount(tmp) == 0)
427 roots = graph.findTreeRoots(graph.getDefaultParent());
432 roots = graph.findTreeRoots(tmp);
442 var layout = new mxRadialTreeLayout(graph, false);
452 layout.execute(graph.getDefaultParent(), tmp);
454 if (!graph.isSelectionEmpty())
456 tmp = graph.getModel().getParent(tmp);
458 if (graph.getModel().isVertex(tmp))
460 graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
470 var layout = new mxFastOrganicLayout(graph);
478 var tmp = graph.getSelectionCell();
480 if (tmp == null || graph.getModel().getChildCount(tmp) == 0)
482 tmp = graph.getDefaultParent();
487 if (graph.getModel().isVertex(tmp))
489 graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
496 var layout = new mxCircleLayout(graph);
500 var tmp = graph.getSelectionCell();
502 if (tmp == null || graph.getModel().getChildCount(tmp) == 0)
504 tmp = graph.getDefaultParent();
509 if (graph.getModel().isVertex(tmp))
511 graph.updateGroupBounds([tmp], graph.gridSize * 2, true);
565 graph.zoomTo(scale);
647 var graph = this.editorUi.editor.graph;
648 var cell = graph.getSelectionCell();
649 var style = graph.getCurrentCellStyle(cell);
651 var isTable = graph.isTable(cell) ||
652 graph.isTableRow(cell) ||
653 graph.isTableCell(cell);
654 var isStack = graph.isStack(cell) ||
655 graph.isStackChild(cell);
662 var style = (graph.isStack(cell)) ? style :
663 graph.getCellStyle(graph.model.getParent(cell));
674 graph.createCrossFunctionalSwimlane(rows, cols, null, null,
676 graph.createTable(rows, cols, null, null,
678 var pt = (mxEvent.isAltDown(evt)) ? graph.getFreeInsertPoint() :
679 graph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry([table], true));
682 graph.getModel().beginUpdate();
685 select = graph.importCells([table], pt.x, pt.y);
686 graph.fireEvent(new mxEventObject('cellsInserted', 'cells',
687 graph.model.getDescendants(select[0])));
691 graph.getModel().endUpdate();
696 graph.scrollCellToVisible(select[0]);
697 graph.setSelectionCells(select);
711 graph.insertLane(cell, true);
715 graph.insertTableColumn(cell, true);
731 graph.insertLane(cell, false);
735 graph.insertTableColumn(cell, false);
753 graph.deleteLane(cell);
757 graph.deleteTableColumn(cell);
777 graph.insertLane(cell, true);
781 graph.insertTableRow(cell, true);
797 graph.insertLane(cell, false);
801 graph.insertTableRow(cell, false);
817 graph.deleteLane(cell);
821 graph.deleteTableRow(cell);
843 var graph = this.editorUi.editor.graph;
844 var td = graph.getParentByName(mxEvent.getSource(evt), 'TD');
846 if (td != null && graph.cellEditor.textarea != null)
848 var row2 = graph.getParentByName(td, 'TR');
852 var tmp = graph.cellEditor.textarea.getElementsByTagName('table');
861 graph.container.focus();
862 graph.pasteHtmlAtCaret(createTable(rows, cols));
865 var newTables = graph.cellEditor.textarea.getElementsByTagName('table');
874 graph.selectNode(newTables[i].rows[0].cells[0]);
883 var graph = this.editorUi.editor.graph;
1020 td = graph.getParentByName(mxEvent.getSource(e), 'TD');
1025 row2 = graph.getParentByName(td, 'TR');
1088 var graph = this.editorUi.editor.graph;
1089 graph.stopEditing(false);
1091 graph.getModel().beginUpdate();
1094 var cells = graph.getSelectionCells();
1101 if (graph.getModel().isEdge(cell))
1105 var geo = graph.getCellGeometry(cell);
1112 graph.getModel().setGeometry(cell, geo);
1118 graph.setCellStyles(keys[j], values[j], [cell]);
1131 graph.getModel().endUpdate();
1163 var graph = this.editorUi.editor.graph;
1165 if (fn != null && graph.cellEditor.isContentEditing())
1190 var graph = this.editorUi.editor.graph;
1191 graph.stopEditing(false);
1193 graph.getModel().beginUpdate();
1196 var cells = graph.getEditableCells(graph.getSelectionCells());
1201 graph.setCellStyles(keys[i], values[i], cells);
1206 graph.updateLabelElements(cells, function(elt)
1225 if (graph.model.getChildCount(cells[j]) == 0)
1227 graph.autoSizeCell(cells[j], false);
1242 graph.getModel().endUpdate();
1254 var graph = this.editorUi.editor.graph;
1256 var state = graph.getView().getState(graph.getSelectionCell());
1271 graph.getModel().beginUpdate();
1274 graph.stopEditing(false);
1275 graph.setCellStyles(key, newValue);
1279 graph.getModel().endUpdate();
1307 var graph = ui.editor.graph;
1311 if (cmd != null && graph.cellEditor.isContentEditing())
1314 var selState = graph.cellEditor.saveSelection();
1318 graph.cellEditor.restoreSelection(selState);
1332 'cells', [graph.cellEditor.getEditingCell()]));
1336 graph.cellEditor.restoreSelection(selState);
1349 var state = graph.getView().getState(graph.getSelectionCell());
1378 var graph = this.editorUi.editor.graph;
1379 var value = graph.toggleCellStyles(key, defaultValue);
1381 'cells', graph.getSelectionCells()));
1465 if (this.editorUi.editor.graph.isSelectionEmpty())
1476 if (this.editorUi.editor.graph.isSelectionEmpty())
1491 if (this.editorUi.editor.graph.getSelectionCount() == 1)
1495 else if (this.editorUi.editor.graph.isSelectionEmpty())
1506 var graph = this.editorUi.editor.graph;
1508 if (graph.getEditableCells(graph.getSelectionCells()).length > 0)
1512 if (graph.getSelectionCount() == 1)
1518 if (graph.getSelectionCount() > 1)
1522 else if (graph.getSelectionCount() == 1 && !graph.getModel().isEdge(cell) &&
1523 !graph.isSwimlane(cell) && graph.getModel().getChildCount(cell) > 0 &&
1524 graph.isCellEditable(cell))
1535 var graph = this.editorUi.editor.graph;
1536 var state = graph.view.getState(cell);
1543 if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(cell))
1549 …if (graph.getModel().isEdge(cell) && mxUtils.getValue(state.style, mxConstants.STYLE_EDGE, null) !…
1552 var handler = graph.selectionCellsHandler.getHandler(cell);
1557 var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
1580 var geo = graph.getModel().getGeometry(cell);
1584 if (graph.getSelectionCount() == 1 && (hasWaypoints || (graph.getModel().isVertex(cell) &&
1585 graph.getModel().getEdgeCount(cell) > 0)))
1590 if (graph.getSelectionCount() == 1 && graph.isCellEditable(cell))
1602 var graph = this.editorUi.editor.graph;
1603 var state = graph.view.getState(cell);
1607 …if (this.editorUi.editor.graph.getModel().isVertex(cell) && mxUtils.getValue(state.style, mxConsta…
1619 if (this.editorUi.editor.graph.isSelectionEmpty())
1737 this.editorUi.editor.graph.popupMenuHandler.hideMenu();