Lines Matching refs:graph

7 Editor = function(chromeless, themes, model, graph, editable)  argument
12 this.graph = graph || this.createGraph(themes, model);
51 this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
57 this.graph.resetViewOnRootChange = false;
389 wnd = this.graph.openLink(this.getEditBlankUrl(
395 this.graph.openLink(this.getEditBlankUrl(p) +
405 var graph = new Graph(null, model, null, null, themes);
406 graph.transparentBackground = false;
409 var graphIsCssTransformsSupported = graph.isCssTransformsSupported;
412 graph.isCssTransformsSupported = function()
421 graph.isBlankLink = function(href)
427 return graph;
435 …this.graph.gridEnabled = this.graph.defaultGridEnabled && (!this.isChromelessView() || urlParams['…
436 this.graph.graphHandler.guidesEnabled = true;
437 this.graph.setTooltips(true);
438 this.graph.setConnectable(true);
439 this.graph.foldingEnabled = true;
440 this.graph.scrollbars = this.graph.defaultScrollbars;
441 this.graph.pageVisible = this.graph.defaultPageVisible;
442 this.graph.pageBreaksVisible = this.graph.pageVisible;
443 this.graph.preferPageSize = this.graph.pageBreaksVisible;
444 this.graph.background = null;
445 this.graph.pageScale = mxGraph.prototype.pageScale;
446 this.graph.pageFormat = mxGraph.prototype.pageFormat;
447 this.graph.currentScale = 1;
448 this.graph.currentTranslate.x = 0;
449 this.graph.currentTranslate.y = 0;
451 this.graph.view.setScale(1);
463 grid = this.graph.defaultGridEnabled ? '1' : '0';
466 this.graph.gridEnabled = grid != '0' && (!this.isChromelessView() || urlParams['grid'] == '1');
467 this.graph.gridSize = parseFloat(node.getAttribute('gridSize')) || mxGraph.prototype.gridSize;
468 this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
469 this.graph.setTooltips(node.getAttribute('tooltips') != '0');
470 this.graph.setConnectable(node.getAttribute('connect') != '0');
471 this.graph.connectionArrowsEnabled = node.getAttribute('arrows') != '0';
472 this.graph.foldingEnabled = node.getAttribute('fold') != '0';
474 if (this.isChromelessView() && this.graph.foldingEnabled)
476 this.graph.foldingEnabled = urlParams['nav'] == '1';
477 this.graph.cellRenderer.forceControlClickHandler = this.graph.foldingEnabled;
484 this.graph.pageScale = ps;
488 this.graph.pageScale = mxGraph.prototype.pageScale;
491 if (!this.graph.isLightboxView() && !this.graph.isViewer())
497 this.graph.pageVisible = (pv != '0');
501 this.graph.pageVisible = this.graph.defaultPageVisible;
506 this.graph.pageVisible = false;
509 this.graph.pageBreaksVisible = this.graph.pageVisible;
510 this.graph.preferPageSize = this.graph.pageBreaksVisible;
517 this.graph.pageFormat = new mxRectangle(0, 0, pw, ph);
525 this.graph.background = bg;
529 this.graph.background = null;
544 this.graph.model.beginUpdate();
548 this.graph.model.clear();
549 this.graph.view.scale = 1;
552 dec.decode(node, this.graph.getModel());
556 this.graph.model.endUpdate();
569 dec.decode(wrapper, this.graph.getModel());
585 this.graph.model.clear();
601 node = enc.encode(this.graph.getModel());
605 node = this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(
606 this.graph.getSelectionCells())));
609 if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
611 node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
612 node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
615 node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
616 node.setAttribute('gridSize', this.graph.gridSize);
617 node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
618 node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
619 node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');
620 node.setAttribute('arrows', (this.graph.connectionArrowsEnabled) ? '1' : '0');
621 node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
622 node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
623 node.setAttribute('pageScale', this.graph.pageScale);
624 node.setAttribute('pageWidth', this.graph.pageFormat.width);
625 node.setAttribute('pageHeight', this.graph.pageFormat.height);
627 if (this.graph.background != null)
629 node.setAttribute('background', this.graph.background);
640 var graph = this.graph;
642 if (graph.container != null)
644 graph.view.validateBackground();
645 graph.container.style.overflow = (graph.scrollbars) ? 'auto' : this.defaultGraphOverflow;
672 var graph = this.graph;
686 graph.getModel().addListener(mxEvent.UNDO, listener);
687 graph.getView().addListener(mxEvent.UNDO, listener);
692 var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes, function(change)
700 var model = graph.getModel();
705 if (graph.view.getState(cand[i]) != null)
711 graph.setSelectionCells(cells);
731 if (this.graph != null)
733 this.graph.destroy();
734 this.graph = null;
1173 var graph = editorUi.editor.graph;
1296 var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
1297 var scale = 1 / graph.pageScale;
1305 scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
1310 var gb = graph.getGraphBounds();
1322 if (!autoOrigin && graph.pageVisible)
1324 var layout = graph.getPageLayout();
1333 var preview = PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin);
1422 PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin) argument
1424 var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
1428 var bg = graph.background;
1464 var graph = editorUi.editor.graph;
1485 var accessor = PageSetupDialog.addPageFormatPanel(td, 'pagesetupdialog', graph.pageFormat);
1517 var newBackgroundColor = graph.background;
1555 gridSizeInput.value = graph.getGridSize();
1561 gridSizeInput.value = Math.max(1, (isNaN(value)) ? graph.getGridSize() : value);
1591 var newBackgroundImage = graph.backgroundImage;
1660 if (!isNaN(gridSize) && graph.gridSize !== gridSize)
1662 graph.setGridSize(gridSize);
1667 change.ignoreColor = graph.background == newBackgroundColor;
1669 var oldSrc = (graph.backgroundImage != null) ? graph.backgroundImage.src : null;
1674 if (graph.pageFormat.width != change.previousFormat.width ||
1675 graph.pageFormat.height != change.previousFormat.height ||
1678 graph.model.execute(change);
2069 var graph = editorUi.editor.graph;
2199 editorUi.editor.graph.openLink(helpLink);
2272 ui.editor.graph.openLink(FilenameDialog.filenameHelpLink);
2278 ui.editor.graph.openLink(FilenameDialog.filenameHelpLink);
2381 var graph = this.graph;
2383 if (graph.container != null && !graph.transparentBackground)
2385 if (graph.pageVisible)
2392 var firstChild = graph.container.firstChild;
2407 this.backgroundPageShape.init(graph.container);
2411 graph.container.insertBefore(this.backgroundPageShape.node, firstChild);
2420 graph.dblClick(evt);
2429 graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
2434 if (graph.tooltipHandler != null && graph.tooltipHandler.isHideOnHover())
2436 graph.tooltipHandler.hide();
2439 if (graph.isMouseDown && !mxEvent.isConsumed(evt))
2441 graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
2446 graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
2471 var graph = this.graph;
2472 …var color = (graph.background == null || graph.background == mxConstants.NONE) ? graph.defaultPage…
2477 if (graph.isGridEnabled() || graph.gridVisible)
2487 phase = graph.gridSize * this.scale * this.gridSteps;
2498 if (graph.view.backgroundPageShape != null)
2511 var canvas = graph.view.canvas;
2518 if (graph.view.backgroundPageShape != null)
2520 graph.view.backgroundPageShape.node.style.backgroundPosition = position;
2521 graph.view.backgroundPageShape.node.style.backgroundImage = image;
2522 graph.view.backgroundPageShape.node.style.backgroundColor = color;
2523 graph.view.backgroundPageShape.node.style.borderColor = graph.defaultPageBorderColor;
2524 graph.container.className = 'geDiagramContainer geDiagramBackdrop';
2530 graph.container.className = 'geDiagramContainer';
2540 var tmp = this.graph.gridSize * this.scale;
2675 if (this.graph.isTableCell(cells[i]) || this.graph.isTableRow(cells[i]))
2679 else if (this.graph.getModel().isVertex(cells[i]))
2681 var geo = this.graph.getCellGeometry(cells[i]);
2715 return new mxRectangleShape(bounds, '#ffffff', this.graph.defaultPageBorderColor);
2729 var fmt = this.graph.pageFormat;
2730 var ps = this.graph.pageScale;
2789 var parent = this.graph.model.getParent(cell)
2793 var geo = (this.graph.model.isEdge(cell)) ? null :
2794 this.graph.getCellGeometry(cell);
2796 result = !this.graph.model.isEdge(parent) &&
2797 !this.graph.isSiblingSelected(cell) &&
2799 !this.graph.isContainer(parent) ||
2800 this.graph.isPart(cell));
2806 if (this.graph.isTableCell(cell) || this.graph.isTableRow(cell))
2810 if (!this.graph.isTable(table))
2812 table = this.graph.model.getParent(table);
2815 result = !this.graph.selectionCellsHandler.isHandled(table) ||
2816 (this.graph.isCellSelected(table) && this.graph.isToggleEvent(me.getEvent())) ||
2817 (this.graph.isCellSelected(cell) && !this.graph.isToggleEvent(me.getEvent())) ||
2818 (this.graph.isTableCell(cell) && this.graph.isCellSelected(parent));
2831 var model = this.graph.getModel();
2833 var state = this.graph.view.getState(parent);
2834 var selected = this.graph.isCellSelected(cell);
2838 var temp = this.graph.isCellSelected(parent);
2841 if (temp || (!selected && (this.graph.isTableCell(cell) ||
2842 this.graph.isTableRow(cell))))