Lines Matching refs:graph

342 		var graph = this.editorUi.editor.graph;
344 graph.getModel().beginUpdate();
347 graph.setCellStyles(this.currentColorKey, color);
349 'values', [color], 'cells', graph.getSelectionCells()));
353 graph.getModel().endUpdate();
491 editorUi.editor.graph.openLink(helpLink);
642 if (editorUi.editor.graph.isEnabled())
659 if (editorUi.editor.graph.isEnabled())
682 editorUi.editor.graph.model.beginUpdate();
695 editorUi.editor.graph.model.endUpdate();
700 editorUi.editor.graph.model.beginUpdate();
709 editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
720 editorUi.editor.graph.model.endUpdate();
750 var graph = editorUi.editor.graph;
751 var bounds = graph.getGraphBounds();
752 var scale = graph.view.scale;
992 transparentCheckbox.checked = graph.background == null || graph.background == mxConstants.NONE;
1202 var bg = graph.background;
1266 var graph = editorUi.editor.graph;
1274 ExportDialog.saveLocalFile(editorUi, mxUtils.getXml(graph.getSvg(bg, s, b)), name, format);
1278 var bounds = graph.getGraphBounds();
1287 xmlCanvas.translate(Math.floor((b / s - bounds.x) / graph.view.scale),
1288 Math.floor((b / s - bounds.y) / graph.view.scale));
1289 xmlCanvas.scale(s / graph.view.scale);
1292 imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
1296 var w = Math.ceil(bounds.width * s / graph.view.scale + 2 * b);
1297 var h = Math.ceil(bounds.height * s / graph.view.scale + 2 * b);
1345 var graph = ui.editor.graph;
1347 var value = graph.getModel().getValue(cell);
1362 var temp = mxUtils.getValue(ui.editor.graph.getCurrentCellStyle(cell), 'metaData', null);
1463 var isLayer = graph.getModel().getParent(cell) == graph.getModel().getRoot();
1508 if (graph.getModel().getCell(value) == null)
1510 graph.getModel().cellRemoved(cell);
1514 graph.getModel().cellAdded(cell);
1675 graph.getModel().setValue(cell, value);
1704 if (ui.editor.graph.getModel().isVertex(cell) || ui.editor.graph.getModel().isEdge(cell))
1780 if (ui.editor.graph.getModel().getParent(cell) != null)
1907 var graph = editorUi.editor.graph;
2016 var graph = editorUi.editor.graph;
2094 if (graph.isEnabled())
2096 graph.model.beginUpdate();
2099 var index = graph.model.root.getIndex(selectionLayer);
2100 graph.removeCells([selectionLayer], false);
2103 if (graph.model.getChildCount(graph.model.root) == 0)
2105 graph.model.add(graph.model.root, new mxCell());
2106 graph.setDefaultParent(null);
2108 else if (index > 0 && index <= graph.model.getChildCount(graph.model.root))
2110 graph.setDefaultParent(graph.model.getChildAt(graph.model.root, index - 1));
2114 graph.setDefaultParent(null);
2119 graph.model.endUpdate();
2126 if (!graph.isEnabled())
2142 if (graph.isEnabled() && !graph.isSelectionEmpty())
2152 var item = menu.addItem(graph.convertValueToString(child) ||
2155 graph.moveCells(graph.getSelectionCells(), 0, 0, false, child);
2158 if (graph.getSelectionCount() == 1 && graph.model.isAncestor(child, graph.getSelectionCell()))
2163 }))(graph.model.getChildAt(graph.model.root, i));
2180 if (graph.isEnabled())
2188 if (!graph.isEnabled())
2197 if (graph.isEnabled() && layer != null)
2199 var label = graph.convertValueToString(layer);
2204 graph.cellLabelChanged(layer, newValue);
2221 if (graph.isEnabled())
2224 graph.model.beginUpdate();
2227 newCell = graph.cloneCell(selectionLayer);
2228 graph.cellLabelChanged(newCell, mxResources.get('untitledLayer'));
2230 newCell = graph.addCell(newCell, graph.model.root);
2231 graph.setDefaultParent(newCell);
2235 graph.model.endUpdate();
2238 if (newCell != null && !graph.isCellLocked(newCell))
2240 graph.selectAll(newCell);
2245 if (!graph.isEnabled())
2261 if (graph.isEnabled())
2263 graph.model.beginUpdate();
2267 var cell = graph.addCell(new mxCell(mxResources.get('untitledLayer')), graph.model.root);
2268 graph.setDefaultParent(cell);
2272 graph.model.endUpdate();
2279 if (!graph.isEnabled())
2300 var div = layerDivs.get(graph.getLayerForCells(graph.getSelectionCells()));
2314 layerCount = graph.model.getChildCount(graph.model.root)
2366 graph.addCell(child, graph.model.root, dropIndex);
2384 graph.model.isVisible(child) ?
2387 if (graph.model.isVisible(child))
2407 graph.model.setVisible(child, !graph.model.isVisible(child));
2420 var style = graph.getCurrentCellStyle(child);
2438 if (graph.isEnabled())
2445 if (graph.isEnabled())
2449 graph.getModel().beginUpdate();
2453 graph.setCellStyles('locked', value, [child]);
2457 graph.getModel().endUpdate();
2462 graph.removeSelectionCells(graph.getModel().getDescendants(child));
2485 if (graph.isEnabled())
2518 if (graph.isEnabled())
2520 graph.addCell(child, graph.model.root, index - 1);
2545 if (graph.isEnabled())
2547 graph.addCell(child, graph.model.root, index + 1);
2575 if (graph.getDefaultParent() == child)
2578 ldiv.style.fontWeight = (graph.isEnabled()) ? 'bold' : '';
2584 if (graph.isEnabled())
2586 graph.setDefaultParent(defaultParent);
2587 graph.view.setCurrentRoot(null);
2591 graph.setSelectionCells(child.children);
2606 addLayer(i, graph.convertValueToString(child) ||
2608 }))(graph.model.getChildAt(graph.model.root, i));
2611 var label = graph.convertValueToString(selectionLayer) || mxResources.get('background');
2615 if (graph.isSelectionEmpty())
2624 graph.model.addListener(mxEvent.CHANGE, refresh);
2625 graph.addListener('defaultParentChanged', refresh);
2627 graph.selectionModel.addListener(mxEvent.CHANGE, function()
2629 if (graph.isSelectionEmpty())