Lines Matching refs:graph

15 	this.graph = editorUi.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());
16 this.graph.cellRenderer.minSvgStrokeWidth = this.minThumbStrokeWidth;
17 this.graph.cellRenderer.antiAlias = this.thumbAntiAlias;
18 this.graph.container.style.visibility = 'hidden';
19 this.graph.foldingEnabled = false;
21 document.body.appendChild(this.graph.container);
295 this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
374 (!applyAllStyles) ? this.editorUi.editor.graph.defaultVertexStyle : null,
375 (!applyAllStyles) ? this.editorUi.editor.graph.defaultEdgeStyle : null,
1151 var temp = parseInt(this.editorUi.editor.graph.defaultVertexStyle['fontSize']);
1365 this.graph.setLinkForCell(cell, 'https://www.draw.io');
1373 this.graph.setAttributeForCell(cell, 'placeholders', '1');
1381 this.graph.setAttributeForCell(cell, 'placeholders', '1');
1382 this.graph.setAttributeForCell(cell, 'name', 'Variable');
2058 this.graph.labelsVisible = (showLabel == null || showLabel);
2061 this.graph.view.scaleAndTranslate(1, 0, 0);
2062 this.graph.addCells(cells);
2064 var bounds = this.graph.getGraphBounds();
2067 this.graph.view.scaleAndTranslate(s, Math.floor((width - bounds.width * s) / 2 / s - bounds.x),
2072 if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO &&
2073 this.graph.view.getCanvas().ownerSVGElement != null)
2075 node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
2080 node = this.graph.container.cloneNode(false);
2081 node.innerHTML = this.graph.container.innerHTML;
2084 this.graph.getModel().clear();
2171 cells = this.graph.cloneCells(cells);
2172 this.editorUi.insertHandler(originalCells, null, this.graph.model,
2173 this.editorUi.editor.graph.defaultVertexStyle,
2174 this.editorUi.editor.graph.defaultEdgeStyle,
2190 return this.editorUi.editor.graph.graphHandler.guidesEnabled;
2220 var graph = this.editorUi.editor.graph;
2221 var sourceCellStyle = graph.getCellStyle(source);
2224 graph.model.beginUpdate();
2227 var cellStyle = graph.getModel().getStyle(source);
2241 if ((graph.getModel().isVertex(targetCell) == graph.getModel().isVertex(source)) ||
2242 (graph.getModel().isEdge(targetCell) == graph.getModel().isEdge(source)))
2244 var style = graph.getCurrentCellStyle(targets[i]);
2245 graph.getModel().setStyle(targetCell, cellStyle);
2250 var childCount = graph.model.getChildCount(targetCell);
2254 graph.model.remove(graph.model.getChildAt(targetCell, j));
2262 graph.setCellStyles(mxConstants.STYLE_SHAPE, 'umlLifeline', [targetCell]);
2263 graph.setCellStyles('participant', sourceCellStyle[mxConstants.STYLE_SHAPE], [targetCell]);
2272 graph.setCellStyles(styles[j], value, [targetCell]);
2282 graph.model.endUpdate();
2295 return mxUtils.bind(this, function(graph, evt, target, x, y, force) argument
2306 if (elt == null && graph.isEnabled())
2308 cells = graph.getImportableCells(cells);
2312 graph.stopEditing();
2316 graph.isValidDropTarget(target, cells, evt) : false;
2325 if (!graph.isCellLocked(target || graph.getDefaultParent()))
2327 graph.model.beginUpdate();
2334 if (allowSplit && graph.isSplitTarget(target, cells, evt))
2336 var s = graph.view.scale;
2337 var tr = graph.view.translate;
2341 var clones = graph.cloneCells(cells);
2342 graph.splitEdge(target, clones, null,
2349 select = graph.importCells(cells, x, y, target);
2353 if (graph.layoutManager != null)
2355 var layout = graph.layoutManager.getLayout(target);
2359 var s = graph.view.scale;
2360 var tr = graph.view.translate;
2373 graph.fireEvent(new mxEventObject('cellsInserted', 'cells', select));
2382 graph.model.endUpdate();
2387 graph.scrollCellToVisible(select[0]);
2388 graph.setSelectionCells(select);
2391 if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
2396 graph.startEditing(select[0]);
2432 var graph = this.editorUi.editor.graph;
2435 graph.model.beginUpdate();
2438 var sourceGeo = graph.getCellGeometry(source);
2439 var geo2 = graph.getCellGeometry(targets[dropCellIndex]);
2442 var targetParent = graph.model.getParent(source);
2446 if (graph.layoutManager != null)
2448 var layout = graph.layoutManager.getLayout(targetParent);
2458 var tmp = (graph.model.isEdge(source)) ? null : graph.view.getState(targetParent);
2478 var useParent = !graph.isTableRow(source) && !graph.isTableCell(source) &&
2479 (graph.model.isEdge(source) || (sourceGeo != null &&
2482 var tempTarget = graph.getCellAt((geo.x + dx + graph.view.translate.x) * graph.view.scale,
2483 … (geo.y + dy + graph.view.translate.y) * graph.view.scale, null, null, null, function(state, x, y)
2485 return !graph.isContainer(state.cell);
2490 tmp = graph.view.getState(tempTarget);
2499 if (!graph.model.isEdge(source))
2506 else if (!validLayout || graph.isTableRow(source) || graph.isTableCell(source))
2516 if (graph.model.isEdge(targets[dropCellIndex]))
2522 targets = graph.importCells(targets, (geo.x - (useParent ? dx : 0)),
2526 if (graph.model.isEdge(source))
2530 graph.model.setTerminal(source, targets[dropCellIndex],
2533 else if (graph.model.isEdge(targets[dropCellIndex]))
2536 graph.model.setTerminal(targets[dropCellIndex], source, true);
2537 var geo3 = graph.getCellGeometry(targets[dropCellIndex]);
2544 else if (useParent && graph.model.isVertex(targetParent))
2547 var tmpState = graph.view.getState(targetParent);
2548 var offset = (tmpState.cell != graph.view.currentRoot) ?
2551 graph.cellsMoved(targets, offset.x, offset.y, null, null, true);
2556 geo2 = graph.getCellGeometry(targets[dropCellIndex]);
2561 graph.model.setGeometry(targets[dropCellIndex], geo);
2562 graph.cellsMoved(targets, dx, dy, null, null, true);
2565 targets.push(graph.insertEdge(null, null, '', source, targets[dropCellIndex],
2566 graph.createCurrentEdgeStyle()));
2571 graph.fireEvent(new mxEventObject('cellsInserted', 'cells', targets));
2580 graph.model.endUpdate();
2583 if (graph.editAfterInsert && evt != null && mxEvent.isMouseEvent(evt) &&
2588 graph.startEditing(editingCell);
2601 var graph = this.editorUi.editor.graph;
2602 var view = graph.view;
2604 var geo = graph.getCellGeometry(source);
2605 var geo2 = graph.getCellGeometry(target);
2611 if (graph.model.isEdge(source))
2613 var state = graph.view.getState(source);
2633 var state = graph.view.getState(source);
2639 var length = graph.defaultEdgeLength;
2642 if (graph.model.isEdge(target) && geo2.getTerminalPoint(true) != null &&
2714 if (graph.model.isEdge(target) && geo2.getTerminalPoint(true) != null &&
2717 var targetGeo = graph.getCellGeometry(target.getTerminal(false));
2759 var vstyle = this.graph.getCellStyle(cells[firstVertex]);
2776 return this.graph.isSwimlane(state.cell) || this.graph.isTableCell(state.cell) ||
2777 this.graph.isTableRow(state.cell) || this.graph.isTable(state.cell);
2787 var graph = ui.editor.graph;
2794 if (firstVertex == null && graph.model.isVertex(cells[i]))
2798 else if (freeSourceEdge == null && graph.model.isEdge(cells[i]) &&
2799 graph.model.getTerminal(cells[i], true) == null)
2812 …var dragSource = mxUtils.makeDraggable(elt, graph, mxUtils.bind(this, function(graph, evt, target,… argument
2821 …var tmp = graph.isCellSelected(currentStyleTarget.cell) ? graph.getSelectionCells() : [currentStyl…
2822 …var updatedCells = this.updateShapes((graph.model.isEdge(currentStyleTarget.cell)) ? cells[0] : ce…
2823 graph.setSelectionCells(updatedCells);
2827 …var index = (graph.model.isEdge(currentTargetState.cell) || freeSourceEdge == null) ? firstVertex …
2828graph.setSelectionCells(this.dropAndConnect(currentTargetState.cell, cells, direction, index, evt)…
2837 this.editorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
2839 }), preview, 0, 0, graph.autoscroll, true, true);
2842 graph.addListener(mxEvent.ESCAPE, function(sender, evt)
2856 !graph.isCellLocked(graph.getDefaultParent()))
2858 graph.stopEditing();
2922 dragSource.createPreviewElement = function(graph) argument
2940 dragSource.dragEnter = function(graph, evt) argument
2951 dragSource.dragExit = function(graph, evt) argument
2961 dragSource.dragOver = function(graph, evt) argument
2972 var view = graph.view;
2976 this.previewElement.style.display = (graph.model.isEdge(currentStyleTarget.cell)) ? 'none' : '';
2990 …var index = (graph.model.isEdge(currentTargetState.cell) || freeSourceEdge == null) ? firstVertex …
2992 …var geo2 = (!graph.model.isEdge(currentTargetState.cell)) ? graph.getCellGeometry(currentTargetSta…
2993 var geo3 = graph.getCellGeometry(cells[index]);
2994 var parent = graph.model.getParent(currentTargetState.cell);
2998 … if (geo2 != null && !geo2.relative && graph.model.isVertex(parent) && parent != view.currentRoot)
3010 if (graph.model.isEdge(cells[index]))
3029 graph.model.isEdge(dragSource.currentHighlight.state.cell))
3051 var sourceCellStyle = this.editorUi.editor.graph.getCellStyle(cells[0]);
3054 dragSource.getDropTarget = mxUtils.bind(this, function(graph, x, y, evt) argument
3059 graph.getCellAt(x, y, null, null, null, function(state, x, y)
3061 return graph.isContainer(state.cell);
3065 if (cell != null && !this.graph.isCellConnectable(cell) &&
3066 !this.graph.model.isEdge(cell))
3068 var parent = this.graph.getModel().getParent(cell);
3070 if (this.graph.getModel().isVertex(parent) &&
3071 this.graph.isCellConnectable(parent))
3078 if (graph.isCellLocked(cell))
3083 var state = graph.view.getState(cell);
3106 dragSource.getDropTarget(graph, x, y, evt);
3124 … timeOnTarget > 1500 || graph.model.isEdge(state.cell)) && (timeOnTarget > this.dropTargetDelay) &&
3125 …!this.isDropStyleTargetIgnored(state) && ((graph.model.isVertex(state.cell) && firstVertex != null…
3126 (graph.model.isEdge(state.cell) && graph.model.isEdge(cells[0]))))
3128 if (graph.isCellEditable(state.cell))
3131 var tmp = (graph.model.isEdge(state.cell)) ? graph.view.getPoint(state) :
3141 graph.container.appendChild(styleTarget);
3163 …var tmp = (graph.model.isEdge(currentStyleTarget.cell)) ? graph.view.getPoint(currentStyleTarget) …
3175 if (graph.model.isEdge(currentTargetState.cell))
3204 bds.grow(this.graph.tolerance);
3207 var handler = this.graph.selectionCellsHandler.getHandler(currentTargetState.cell);
3265 var validTarget = (firstVertex == null || graph.isCellConnectable(cells[firstVertex])) &&
3266 ((graph.model.isEdge(cell) && firstVertex != null) ||
3267 (graph.model.isVertex(cell) && graph.isCellConnectable(cell)));
3277 graph.model.isEdge(cell)) ? state : null;
3291 if (graph.model.isEdge(cell))
3299 var tol = graph.tolerance;
3308 if (graph.model.getTerminal(cell, true) == null)
3310 graph.container.appendChild(roundSource);
3313 if (graph.model.getTerminal(cell, false) == null)
3315 graph.container.appendChild(roundTarget);
3329 bds.grow(this.graph.tolerance);
3332 var handler = this.graph.selectionCellsHandler.getHandler(state.cell);
3365 graph.container.appendChild(arrowUp);
3366 graph.container.appendChild(arrowDown);
3369 graph.container.appendChild(arrowRight);
3370 graph.container.appendChild(arrowLeft);
3376 currentStateHandle = graph.selectionCellsHandler.getHandler(state.cell);
3409 var model = graph.getModel();
3413 if (activeArrow != null || !graph.isSplitTarget(target, cells, evt))
3416 while (target != null && !graph.isValidDropTarget(target, cells, evt) &&
3422 if (target != null && (graph.view.currentRoot == target ||
3423 (!graph.isValidRoot(target) &&
3424 graph.getModel().getChildCount(target) == 0) ||
3425 graph.isCellLocked(target) || model.isEdge(target) ||
3426 !graph.isValidDropTarget(target, cells, evt)))
3433 if (graph.isCellLocked(target))
3475 var graph = this.editorUi.editor.graph;
3476 graph.container.focus();
3479 if (mxEvent.isAltDown(evt) && graph.getSelectionCount() == 1 &&
3480 graph.model.isVertex(graph.getSelectionCell()))
3486 if (graph.model.isVertex(cells[i]))
3494 graph.setSelectionCells(this.dropAndConnect(graph.getSelectionCell(), cells,
3499 graph.scrollCellToVisible(graph.getSelectionCell());
3503 else if (mxEvent.isShiftDown(evt) && !graph.isSelectionEmpty())
3505 var temp = graph.getEditableCells(graph.getSelectionCells());
3507 graph.scrollCellToVisible(temp);
3511 var pt = (mxEvent.isAltDown(evt)) ? graph.getFreeInsertPoint() :
3512 graph.getCenterInsertPoint(graph.getBoundingBoxFromGeometry(cells, true));
3513 ds.drop(graph, evt, null, pt.x, pt.y, true);
3522 var graph = this.editorUi.editor.graph;
3526 var tol = graph.tolerance;
3620 var cells = this.graph.cloneCells(model.root.getChildAt(0).children);
3949 if (this.graph != null)
3951 if (this.graph.container != null && this.graph.container.parentNode != null)
3953 this.graph.container.parentNode.removeChild(this.graph.container);
3956 this.graph.destroy();
3957 this.graph = null;