Lines Matching refs:graph

547 		return this.editor.graph.openLink(url, target, allowOpener);
587 this.editor.graph.mathEnabled = value;
589 this.editor.graph.refresh();
590 this.editor.graph.defaultMathEnabled = value;
597 return this.editor.graph.mathEnabled;
807 var graph = this.editor.graph;
812 if (graph.isSelectionEmpty() && ui.pages != null && ui.pages.length > 0)
996 var graph = this.editor.graph;
998 graph.model.beginUpdate();
1021 graph.model.execute(new ChangePage(this, page, (i == 0) ? page : null, 0));
1032 graph.model.execute(new ChangePage(this, this.currentPage, this.currentPage, 0));
1041 this.currentPage.root = this.editor.graph.model.root;
1049 graph.model.execute(new ChangePage(this, oldPages[i], null));
1055 graph.model.endUpdate();
1066 EditorUi.prototype.createFileData = function(node, graph, file, url, forceXml, forceSvg, forceHtml, argument
1069 graph = (graph != null) ? graph : this.editor.graph;
1188 …xml = this.getHtml2(mxUtils.getXml(fileNode), graph, (file != null) ? file.getTitle() : null, edit…
1198 xml = this.getEmbeddedSvg(xml, graph, url, null, embeddedCallback, ignoreSelection, redirect);
1282 this.editor.graph.saveViewState(page.viewState,
1315 this.editor.graph.saveViewState(page.viewState,
1598 var graph = this.editor.graph;
1603 var darkTheme = graph.themes != null && graph.defaultThemeName == 'darkTheme';
1612 var graphGetGlobalVariable = graph.getGlobalVariable;
1613 graph = this.createTemporaryGraph(darkTheme ?
1614 graph.getDefaultStylesheet() : graph.getStylesheet());
1615 graph.setBackgroundImage = this.editor.graph.setBackgroundImage;
1620 graph.setBackgroundImage(this.editor.graph.backgroundImage);
1624 graph.setBackgroundImage(page.viewState.backgroundImage);
1627 graph.getGlobalVariable = function(name)
1641 document.body.appendChild(graph.container);
1642 graph.model.setRoot(page.root);
1650 var result = this.createFileData(node, graph, file, window.location.href,
1655 if (graph != this.editor.graph)
1657 graph.container.parentNode.removeChild(graph.container);
1666 EditorUi.prototype.getHtml = function(node, graph, title, editLink, redirect, ignoreSelection) argument
1673 if (graph != null)
1675 …var bounds = (ignoreSelection) ? graph.getGraphBounds() : graph.getBoundingBox(graph.getSelectionC…
1676 var scale = graph.view.scale;
1677 var x0 = Math.floor(bounds.x / scale - graph.view.translate.x);
1678 var y0 = Math.floor(bounds.y / scale - graph.view.translate.y);
1679 bg = graph.background;
1754 EditorUi.prototype.getHtml2 = function(xml, graph, title, editLink, redirect) argument
1764 var data = {highlight: '#0000ff', nav: this.editor.graph.foldingEnabled, resize: true,
1876 this.currentPage.root = this.editor.graph.model.root;
1891 var model = this.editor.graph.getModel();
1949 …ignoreSelection = (ignoreSelection != null) ? ignoreSelection : this.editor.graph.isSelectionEmpty…
1964 var data = this.getHtml2(this.getFileData(true), this.editor.graph, basename);
1988 var bg = this.editor.graph.background;
1997 var svgRoot = this.editor.graph.getSvg(bg, null, null, null, null, ignoreSelection);
2001 this.editor.graph.addSvgShadow(svgRoot);
2038 var prev = this.editor.graph.pageVisible;
2042 this.editor.graph.pageVisible = pageVisible;
2047 this.editor.graph.pageVisible = prev;
2073 var graph = this.editor.graph;
2074 var bounds = graph.getGraphBounds();
2123 var bg = graph.background;
2134 var extras = {globalVars: graph.getExportVariables()};
2139 size: graph.gridSize,
2140 steps: graph.view.gridSteps,
2141 color: graph.view.gridColor
2306 var overlay = new mxCellOverlay(desc.image || graph.warningImage,
2325 var graph = this.editor.graph;
2326 var model = graph.getModel();
2364 graph.setAttributeForCell(cell, attrs[j].nodeName,
2386 graph.model.setStyle(cell, style);
2408 graph.removeCellOverlays(cell);
2413 graph.addCellOverlay(cell, createOverlay(desc));
2433 var curr = graph.getCellGeometry(cell);
2466 graph.model.setGeometry(cell, curr);
2499 graph.view.scale = parseFloat(node.getAttribute('scale'));
2504 graph.view.translate = new mxPoint(parseFloat(node.getAttribute('dx') || 0),
2603 this.editor.graph.model.clear();
2618 this.editor.graph.model.clear();
2666 this.editor.graph.model.prefix = Editor.guid() + '-';
2695 this.editor.graph.selectUnlockedLayer();
2705 else if (this.editor.graph.isLightboxView())
2841 this.editor.graph.saveViewState(pages[i].viewState, xmlNode, true);
3256 var graph = this.editor.graph;
3323 cells = graph.cloneCells(mxUtils.sortCells(graph.model.getTopmostCells(cells)));
3328 var geo = graph.getCellGeometry(cells[i]);
3339 var xml = Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(cells)));
3359 if (!graph.isSelectionEmpty())
3361 var cells = graph.getSelectionCells();
3362 var bounds = graph.view.getBounds(cells);
3364 var s = graph.view.scale;
3371 bounds.x -= graph.view.translate.x;
3372 bounds.y -= graph.view.translate.y;
3376 else if (graph.getRubberband().isActive())
3378 graph.getRubberband().execute(evt);
3379 graph.getRubberband().reset();
3392 if (graph.isMouseDown && graph.panningManager != null && graph.graphHandler.first != null)
3394 graph.graphHandler.suspend();
3396 if (graph.graphHandler.hint != null)
3398 graph.graphHandler.hint.style.visibility = 'hidden';
3403 graph.panningManager.stop();
3404 graph.autoScroll = false;
3410 if (graph.isMouseDown && graph.panningManager != null && graph.graphHandler != null)
3415 graph.panningManager.stop();
3417 graph.graphHandler.reset();
3418 graph.isMouseDown = false;
3419 graph.autoScroll = true;
3429 if (graph.isMouseDown && graph.graphHandler.first != null)
3431 graph.graphHandler.resume();
3433 if (graph.graphHandler.hint != null)
3435 graph.graphHandler.hint.style.visibility = 'visible';
3440 graph.autoScroll = true;
3527 var size = this.editor.graph.getBoundingBoxFromGeometry(cells);
3785 this.editor.graph.model.execute(change);
3820 this.editor.graph.addListener('viewStateChanged', mxUtils.bind(this, function(evt)
3822 if (this.editor.graph.isSelectionEmpty())
3965 this.editor.graph.openLink('https://drive.google.com/open?id=' + id);
4095 return this.editor.graph.openLink(e.helpLink);
4712 this.tagsComponent = this.editor.graph.createTagsDialog(mxUtils.bind(this, function()
4766 var style = mxUtils.getCurrentStyle(this.editor.graph.container);
4778 var model = this.editor.graph.getModel();
4782 var tags = this.editor.graph.getAllTags();
4822 mxEvent.addListener(this.editor.graph.container, 'click', mxUtils.bind(this, function()
4845 mxEvent.removeListener(this.editor.graph.container, 'click', clickHandler);
4878 var style = mxUtils.getCurrentStyle(this.editor.graph.container);
4930 mxEvent.addListener(this.editor.graph.container, 'click', clickHandler);
5102 var selectionEmpty = this.editor.graph.isSelectionEmpty();
5104 var bg = (transparentBackground) ? null : this.editor.graph.background;
5114 bg = (keepTheme) ? this.editor.graph.defaultPageBackgroundColor : '#ffffff';
5119 var svgRoot = this.editor.graph.getSvg(bg, scale, border, noCrop,
5126 this.editor.graph.addSvgShadow(svgRoot);
5161 if (this.editor.graph.mathEnabled)
5469 if (this.editor.graph.foldingEnabled)
5558 data.nav = this.editor.graph.foldingEnabled;
5641 var graph = this.editor.graph;
5762 var graph = this.editor.graph;
5973 this.editor.graph.isSelectionEmpty());
5977 var graph = this.editor.graph;
5979 graph.background == mxConstants.NONE || graph.background == null);
6007 var graph = this.editor.graph;
6036 false, graph.isSelectionEmpty());
6053 if (!graph.isSelectionEmpty() || sizes[i] != 'selectionOnly')
6098 if (graph.isSelectionEmpty())
6138 var shadow = this.addCheckbox(div, mxResources.get('shadow'), graph.shadowVisible);
6239 var graph = this.editor.graph;
6251 graph.shadowVisible && shadowEnabled, !shadowEnabled);
6257 var hasLayers = graph.model.getChildCount(graph.model.getRoot()) > 1;
6303 var bounds = this.editor.graph.getGraphBounds();
6396 var svgRoot = this.editor.graph.getSvg(null, null, null, null, null,
6424 this.editor.graph.addSvgShadow(svgRoot);
6500 if (this.editor.graph.mathEnabled)
6564 EditorUi.prototype.decodeNodeIntoGraph = function(node, graph) argument
6581 var graphGetGlobalVariable = graph.getGlobalVariable;
6583 graph.getGlobalVariable = function(name)
6606 var prev = this.editor.graph;
6610 this.editor.graph = graph;
6619 this.editor.graph = prev;
6666 var graph = this.editor.graph;
6667 var darkTheme = graph.themes != null && graph.defaultThemeName == 'darkTheme';
6673 graph = this.createTemporaryGraph((darkTheme) ?
6674 graph.getDefaultStylesheet() : graph.getStylesheet());
6675 document.body.appendChild(graph.container);
6677 mxUtils.parseXml(optionalData).documentElement, true), graph);
6683 graph = this.createTemporaryGraph((darkTheme) ?
6684 graph.getDefaultStylesheet() : graph.getStylesheet());
6685 var graphGetGlobalVariable = graph.getGlobalVariable;
6686 graph.setBackgroundImage = this.editor.graph.setBackgroundImage;
6691 graph.setBackgroundImage(this.editor.graph.backgroundImage);
6695 graph.setBackgroundImage(page.viewState.backgroundImage);
6698 graph.getGlobalVariable = function(name)
6712 document.body.appendChild(graph.container);
6713 graph.model.setRoot(page.root);
6732 if (graph != this.editor.graph)
6734 graph.container.parentNode.removeChild(graph.container);
6750 }), null, null, scale, null, graph.shadowVisible, null,
6751 graph, border, null, null, null, 'diagram', null);
6766 EditorUi.prototype.getEmbeddedSvg = function(xml, graph, url, noHeader, callback, ignoreSelection, argument
6772 var bg = (background != null) ? background : graph.background;
6781 var svgRoot = graph.getSvg(bg, scale, border, null, null, ignoreSelection, null,
6782 null, null, graph.shadowVisible || shadow, null, keepTheme, 'diagram');
6784 if (graph.shadowVisible || shadow)
6786 graph.addSvgShadow(svgRoot, null, null, border == 0);
6821 if (graph.mathEnabled)
6897 var selectionEmpty = this.editor.graph.isSelectionEmpty();
6961 var graph = this.editor.graph;
6966 graph.model.beginUpdate();
6996 this.editor.graph.model.execute(new RenamePage(
7033 graph.model.execute(new ChangePage(this, page, page, index, true));
7043 cells = graph.importGraphModel(node, dx, dy, crop);
7057 graph.defaultVertexStyle,
7058 graph.defaultEdgeStyle,
7064 graph.model.endUpdate();
7100 var graph = this.editor.graph;
7101 var href = graph.getLinkForCell(cell);
7105 graph.setLinkForCell(cell, this.updatePageLink(mapping, href));
7108 if (graph.isHtmlLabel(cell))
7110 temp.innerHTML = graph.sanitizeHtml(graph.getLabel(cell));
7127 graph.labelChanged(cell, temp.innerHTML);
7131 for (var i = 0; i < graph.model.getChildCount(cell); i++)
7133 this.updatePageLinksForCell(mapping, graph.model.getChildAt(cell, i));
7791 var graph = this.editor.graph;
7794 graph.getModel().beginUpdate();
7797 cell = graph.insertVertex(null, null, '<pre>' + text + '</pre>',
7799 graph.updateCellSize(cell, true);
7803 graph.getModel().endUpdate();
7828 this.editor.graph.setSelectionCells(this.insertTextAt(
7840 var graph = this.editor.graph;
7900 graph.setSelectionCell(graph.insertVertex(null, null, '', graph.snap(dx), graph.snap(dy),
7911 graph.setSelectionCell(graph.insertVertex(null, null, '', graph.snap(dx), graph.snap(dy),
7920 graph.getModel().beginUpdate();
7923 cell = graph.insertVertex(graph.getDefaultParent(), null, text,
7924 graph.snap(dx), graph.snap(dy), 1, 1, 'text;' + ((html) ? 'html=1;' : ''));
7925 graph.updateCellSize(cell);
7926 graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));
7930 graph.getModel().endUpdate();
7933 graph.setSelectionCell(cell);
7952 this.editor.graph.setSelectionCells(
7962 var graph = this.editor.graph;
7965 graph.getModel().beginUpdate();
7970 cell = graph.insertVertex(graph.getDefaultParent(), null, '',
7971 graph.snap(dx), graph.snap(dy), 1, 1, 'text;whiteSpace=wrap;' + ((html) ? 'html=1;' : ''));
7972 graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));
7990 graph.updateCellSize(cell);
7995 var size = graph.getPreferredSizeForCell(cell, this.maxTextWidth);
8003 graph.setLinkForCell(cell, cell.value);
8007 cell.geometry.width += graph.gridSize;
8008 cell.geometry.height += graph.gridSize;
8012 graph.getModel().endUpdate();
9604 graph.insertImage(data, w, h);
9634 graph.insertImage(decodeURIComponent(uri), w * s, h * s);
9664 var view = this.editor.graph.view;
9700 …this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(), this.styleInput.value);
9705 …this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function(send…
9707 if (this.editor.graph.getSelectionCount() > 0)
9709 var cell = this.editor.graph.getSelectionCell();
9710 var style = this.editor.graph.getModel().getStyle(cell);
9749 mxEvent.addListener(graph.container, 'dragleave', function(evt)
9751 if (graph.isEnabled())
9764 mxEvent.addListener(graph.container, 'dragover', mxUtils.bind(this, function(evt)
9769 dropElt = this.highlightElement(graph.container);
9781 mxEvent.addListener(graph.container, 'drop', mxUtils.bind(this, function(evt)
9789 if (graph.isEnabled())
9791 … var pt = mxUtils.convertPoint(graph.container, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
9792 var tr = graph.view.translate;
9793 var scale = graph.view.scale;
9829 graph.setSelectionCells(this.importXml(data, x, y, true));
9835 div.innerHTML = graph.sanitizeHtml(html);
9884 graph.setSelectionCells(this.insertTextAt(html, x, y, true,
9911 graph.setSelectionCell(graph.insertVertex(null, null, '', x, y, w * s, h * s,
9916 graph.setSelectionCells(this.insertTextAt(uri, x, y, true));
9921graph.setSelectionCells(this.insertTextAt(evt.dataTransfer.getData('text/plain'), x, y, true));
9931 graph.enableFlowAnimation = true;
9950 var graph = this.editor.graph;
9952 graph.container.addEventListener('paste', mxUtils.bind(this, function(evt)
9983 if (graph.isEditing())
9988 graph.insertImage(data, w, h);
10007 var pt = this.editor.graph.getInsertPoint();
10031 var graph = this.editor.graph;
10072 if (graph.container != null && graph.isEnabled() && !graph.isMouseDown && !graph.isEditing() &&
10082 textInput.style.left = (graph.container.scrollLeft + 10) + 'px';
10083 textInput.style.top = (graph.container.scrollTop + 10) + 'px';
10085 graph.container.appendChild(textInput);
10120 if (!graph.isEditing() && this.dialog == null && graph.container != null)
10122 graph.container.focus();
10138 if (graph.isEnabled())
10142 mxClipboard.copy(graph);
10155 if (graph.isEnabled())
10159 mxClipboard.copy(graph);
10172 if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
10278 var graph = this.editor.graph;
10292 graph.defaultVertexStyle = mxUtils.clone(Graph.prototype.defaultVertexStyle);
10293 setStyle(graph.defaultVertexStyle, 'fontSize', this.menus.defaultFontSize);
10295 graph.defaultEdgeStyle = mxUtils.clone(Graph.prototype.defaultEdgeStyle);
10296 setStyle(graph.defaultEdgeStyle, 'fontSize', this.menus.defaultFontSize - 4);
10297 setStyle(graph.defaultEdgeStyle, 'edgeStyle', 'none');
10298 setStyle(graph.defaultEdgeStyle, 'rounded', '0');
10299 setStyle(graph.defaultEdgeStyle, 'curved', '1');
10300 setStyle(graph.defaultEdgeStyle, 'jettySize', 'auto');
10301 setStyle(graph.defaultEdgeStyle, 'orthogonalLoop', '1');
10302 setStyle(graph.defaultEdgeStyle, 'endArrow', 'open');
10303 setStyle(graph.defaultEdgeStyle, 'endSize', '14');
10304 setStyle(graph.defaultEdgeStyle, 'startSize', '14');
10308 setStyle(graph.defaultVertexStyle, 'fontFamily', Editor.sketchFontFamily);
10309 setStyle(graph.defaultVertexStyle, 'fontSource', Editor.sketchFontSource);
10310 setStyle(graph.defaultVertexStyle, 'hachureGap', '4');
10311 setStyle(graph.defaultVertexStyle, 'sketch', '1');
10313 setStyle(graph.defaultEdgeStyle, 'fontFamily', Editor.sketchFontFamily);
10314 setStyle(graph.defaultEdgeStyle, 'fontSource', Editor.sketchFontSource);
10315 setStyle(graph.defaultEdgeStyle, 'sketch', '1');
10316 setStyle(graph.defaultEdgeStyle, 'hachureGap', '4');
10317 setStyle(graph.defaultEdgeStyle, 'sourcePerimeterSpacing', '8');
10318 setStyle(graph.defaultEdgeStyle, 'targetPerimeterSpacing', '8');
10327 graph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
10328 graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
10388 this.editor.graph.handleCustomLink(href);
10464 this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
10469 mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
10476 this.editor.graph.pageFormat = (this.editor.graph.defaultPageFormat != null) ?
10477 this.editor.graph.defaultPageFormat : mxSettings.getPageFormat();
10481 mxSettings.setPageFormat(this.editor.graph.pageFormat);
10488 this.editor.graph.view.gridColor = mxSettings.getGridColor(Editor.isDarkMode());
10492 mxSettings.setGridColor(this.editor.graph.view.gridColor, Editor.isDarkMode());
10575 this.editor.graph.background == null ||
10576 this.editor.graph.background == mxConstants.NONE,
10604 var graph = this.editor.graph;
10606 if (!graph.isSelectionEmpty())
10609 var cells = mxUtils.sortCells(graph.model.getTopmostCells(graph.getSelectionCells()));
10610 var xml = mxUtils.getXml(graph.encodeCells(cells));
10615 graph.removeCells(cells, false);
10616 graph.lastPasteXml = null;
10620 graph.lastPasteXml = xml;
10621 graph.pasteCounter = 0;
10643 var graph = this.editor.graph;
10645 if (!graph.isSelectionEmpty())
10647 cells = mxUtils.sortCells(graph.getExportableCells(
10648 graph.model.getTopmostCells(graph.getSelectionCells())));
10649 var xml = mxUtils.getXml(graph.encodeCells(cells));
10662 var graph = this.editor.graph;
10665 if (graph.lastPasteXml == xml)
10667 graph.pasteCounter++;
10671 graph.lastPasteXml = xml;
10672 graph.pasteCounter = 0;
10675 var dx = graph.pasteCounter * graph.gridSize;
10680 graph.setSelectionCells(cells);
10682 else if (pasteAsLabel && graph.getSelectionCount() == 1)
10684 var cell = graph.getStartEditingCell(graph.getSelectionCell(), evt);
10687 graph.getCurrentCellStyle(cell)[mxConstants.STYLE_SHAPE] == 'image')
10689 graph.setCellStyles(mxConstants.STYLE_IMAGE, xml, [cell]);
10693 graph.model.beginUpdate();
10696 graph.labelChanged(cell, xml);
10700 graph.setLinkForCell(cell, xml);
10705 graph.model.endUpdate();
10709 graph.setSelectionCell(cell);
10713 var pt = graph.getInsertPoint();
10715 if (graph.isMouseInsertPoint())
10720 if (graph.lastPasteXml == xml && graph.pasteCounter > 0)
10722 graph.pasteCounter--;
10727 graph.setSelectionCells(cells);
10730 if (!graph.isSelectionEmpty())
10732 graph.scrollCellToVisible(graph.getSelectionCell());
10736 this.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
10796 var graph = this.editor.graph;
10798 if (graph.lastPasteXml == xml)
10800 graph.pasteCounter++;
10804 graph.lastPasteXml = xml;
10805 graph.pasteCounter = 0;
10808 var dx = graph.pasteCounter * graph.gridSize;
10809 graph.setSelectionCells(this.importXml(xml, dx, dx));
10810 graph.scrollCellToVisible(graph.getSelectionCell());
10879 var graph = this.editor.graph;
10881 graph.lastPasteXml = null;
10882 graph.pasteCounter = 0;
10922 if (this.editor.graph.isEnabled() || urlParams['embed'] != '1')
10943 if (this.editor.graph.isEnabled() || urlParams['embed'] != '1')
10992 div.innerHTML = this.editor.graph.sanitizeHtml(data);
11096 if (elt != null && elt.parentNode == this.editor.graph.container)
11098 this.editor.graph.container.appendChild(hl);
11362 this.editor.graph.selectAll();
11430 this.addBasenamesForCell(this.editor.graph.model.getRoot(), basenames);
11467 var graph = this.editor.graph;
11468 var style = graph.getCellStyle(cell);
11473 if (graph.model.isEdge(cell))
11479 var childCount = graph.model.getChildCount(cell);
11483 this.addBasenamesForCell(graph.model.getChildAt(cell, i), basenames);
11497 this.editor.graph.setEnabled(enabled);
11580 var graph = this.editor.graph;
11581 graph.setGridEnabled(false);
11582 graph.pageVisible = false;
11583 var cells = graph.model.cells;
11607 else if (this.editor.graph.isLightboxView())
11642 if (this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot()) > 1)
11675 var graph = this.editor.graph;
11677 return {event: eventName, pageVisible: graph.pageVisible, translate: graph.view.translate,
11678 bounds: graph.getGraphBounds(), currentPage: this.getSelectedPageIndex(),
11679 scale: graph.view.scale, page: graph.view.getBackgroundPageBounds()};
11687 var graph = this.editor.graph;
11689 if (graph.isEditing())
11691 graph.stopEditing(!graph.isInvokesStopCellEditing());
11706 var bg = graph.background;
11714 null, null, null, null, false), graph, null, true,
11729 graph.model.clear();
11760 this.editor.graph.model.addListener(mxEvent.CHANGE, updateStatus);
12102 this.editor.graph.setEnabled(false);
12103 var graph = this.editor.graph;
12107 this.editor.graph.setEnabled(true);
12132 if (graph != this.editor.graph)
12134 graph.container.parentNode.removeChild(graph.container);
12151 var graphGetGlobalVariable = graph.getGlobalVariable;
12152 graph = this.createTemporaryGraph(graph.getStylesheet());
12170 graph.getGlobalVariable = function(name)
12184 document.body.appendChild(graph.container);
12185 graph.model.setRoot(page.root);
12191 var graphModel = graph.model;
12213 graph, data.border, null, data.grid, data.keepTheme);
12223 if (this.editor.graph.mathEnabled)
12292 msg.data = this.getHtml(xml, this.editor.graph);
12301 var bg = (data.background != null) ? data.background : this.editor.graph.background;
12314 this.editor.graph.setEnabled(true);
12326 this.getEmbeddedSvg(msg.xml, this.editor.graph, null, true, postResult, null, null,
12335 this.editor.graph.setEnabled(false);
12336 var svgRoot = this.editor.graph.getSvg(bg, data.scale, data.border, null, null,
12337 null, null, null, null, this.editor.graph.shadowVisible || data.shadow,
12340 if (this.editor.graph.shadowVisible || data.shadow)
12342 this.editor.graph.addSvgShadow(svgRoot);
12375 if (this.editor.graph.mathEnabled)
12469 var graph = this.editor.graph;
12470 var prev = graph.maxFitScale;
12471 graph.maxFitScale = data.maxFitScale;
12472 graph.fit(2 * border);
12473 graph.maxFitScale = prev;
12474 graph.container.scrollTop -= 2 * border;
12475 graph.container.scrollLeft -= 2 * border;
12616 this.editor.graph.model.addListener(mxEvent.CHANGE, changeListener);
12619 this.editor.graph.addListener('gridSizeChanged', changeListener);
12620 this.editor.graph.addListener('shadowVisibleChanged', changeListener);
12710 var graphOpenLink = this.editor.graph.openLink;
12712 this.editor.graph.openLink = function(href, target, allowOpener)
12837 var graph = this.editor.graph;
12838 var cells = graph.getSelectionCells();
12842 var layout = new window[layoutList[i].layout](graph);
12854 layout.execute(graph.getDefaultParent(), cells.length == 0 ? null : cells);
12897 var graph = this.editor.graph;
12898 var view = graph.view;
12899 var bds = graph.getGraphBounds();
12910 graph.setSelectionCells(select);
12911 graph.scrollCellToVisible(graph.getSelectionCell());
12916 var pt = graph.getFreeInsertPoint();
12966 label = graph.sanitizeHtml(value);
13122 graph.model.beginUpdate();
13133 cell = graph.model.getCell(id);
13144 graph.setAttributeForCell(newCell, attribs[j], values[j]);
13153 graph.labelChanged(newCell, tempLabel);
13167 graph.setAttributeForCell(newCell, 'placeholders', '1');
13168 newCell.style = graph.replacePlaceholders(newCell, newCell.style, vars);
13172 graph.model.setValue(cell, newCell.value);
13173 graph.model.setStyle(cell, newCell.style);
13180 graph.fireEvent(new mxEventObject('cellsInserted', 'cells', [cell]));
13184 graph.fireEvent(new mxEventObject('cellsInserted', 'cells', [newCell]));
13199 graph.setLinkForCell(cell, cell.getAttribute(link));
13202 graph.setAttributeForCell(cell, link, null);
13206 var size = this.editor.graph.getPreferredSizeForCell(cell);
13207 var parent = (parentIndex != null) ? graph.model.getCell(
13258 parent.style = graph.replacePlaceholders(parent, parentstyle, vars);
13259 graph.addCell(cell, parent);
13264 cells.push(graph.addCell(cell));
13287 graph.updateGroupBounds([parents[i]], padding, true);
13327 label = graph.replacePlaceholders(dataCell,
13338 label = (label || '') + graph.replacePlaceholders(
13345 graph.replacePlaceholders(placeholders, edge.style, vars) :
13346 graph.createCurrentEdgeStyle();
13348 var edgeCell = graph.insertEdge(null, null, label || '', (edge.invert) ?
13368 el.value = graph.replacePlaceholders(
13415 graph.setAttributeForCell(cell, mxUtils.trim(ignore[j]), null);
13422 var edgeLayout = new mxParallelEdgeLayout(graph);
13430 edgeLayout.execute(graph.getDefaultParent());
13436 var geo = graph.getCellGeometry(cells[i]);
13437 geo.x = Math.round(graph.snap(geo.x));
13438 geo.y = Math.round(graph.snap(geo.y));
13442 geo.width = Math.round(graph.snap(geo.width));
13447 geo.height = Math.round(graph.snap(geo.height));
13456 graph.view.validate();
13466 var circleLayout = new mxCircleLayout(graph);
13481 circleLayout.execute(graph.getDefaultParent());
13491 graph.view.validate();
13493 var treeLayout = new mxCompactTreeLayout(graph, layout == 'horizontaltree');
13500 treeLayout.execute(graph.getDefaultParent(), (roots.length > 0) ? roots[0] : null);
13509 graph.view.validate();
13511 var flowLayout = new mxHierarchicalLayout(graph,
13520 flowLayout.execute(graph.getDefaultParent(), select);
13523 graph.moveCells(select, x0, y0);
13532 graph.view.validate();
13534 var organicLayout = new mxFastOrganicLayout(graph);
13550 organicLayout.execute(graph.getDefaultParent());
13562 graph.model.endUpdate();
13717 this.editor.graph.isEnabled());
13722 !this.editor.graph.isEnabled()) &&
13732 this.editor.graph.isEnabled();
13743 this.editor.graph.isEnabled()) ||
13817 (urlParams['embed'] == '1' && this.editor.graph.isEnabled());
13828 var graph = this.editor.graph;
13831 var editable = graph.getEditableCells(graph.getSelectionCells());
13837 this.actions.get('editData').setEnabled(editable.length > 0 || graph.isSelectionEmpty());
13841 this.actions.get('copyStyle').setEnabled(active && !graph.isSelectionEmpty());
13844 graph.getModel().isVertex(editable[0]));
13860 findReplace.label = mxResources.get('find') + ((graph.isEnabled()) ?
13863 var state = graph.view.getState(graph.getSelectionCell());
13893 var graph = editorUi.editor.graph;
13903 editorUi.saveData(name, 'svg', mxUtils.getXml(graph.getSvg(bg, s, b)), 'image/svg+xml');
13908 var bounds = graph.getGraphBounds();
13909 var w = Math.floor(bounds.width * s / graph.view.scale);
13910 var h = Math.floor(bounds.height * s / graph.view.scale);
13931 var extras = {globalVars: graph.getExportVariables()};
13936 size: graph.gridSize,
13937 steps: graph.view.gridSteps,
13938 color: graph.view.gridColor
13964 this.editor.graph.setEnabled(false);
13965 var graph = this.editor.graph;
13973 var pageGraph = graph;
13977 pageGraph = this.createTemporaryGraph(graph.getStylesheet());
13986 allPagesTxt = graph.getIndexableText();
13989 this.editor.graph.setEnabled(true);
13998 var graph = this.editor.graph;
14908 …ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid, … argument
14912 ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border,