Lines Matching refs:model

268 Graph = function(container, model, renderHint, stylesheet, themes, standalone)  argument
270 mxGraph.call(this, container, model, renderHint, stylesheet);
334 if (this.model.isEdge(state.cell))
370 var row = this.model.getParent(state.cell);
371 var table = this.model.getParent(row);
379 this.model.getChildAt(table, 0) != row) || mxUtils.intersects(box, new mxRectangle(
382 … this.model.getChildAt(row, 0) != state.cell) || mxUtils.intersects(box, new mxRectangle(
433 current = this.view.getState(this.model.getParent(current.cell));
472 if (handler == null && this.model.isEdge(state.cell))
614 if (this.model.isEdge(state.cell))
658 var row = this.model.getParent(state.cell);
659 var table = this.model.getParent(row);
664 this.model.getChildAt(row, 0) != state.cell) || mxUtils.intersects(box,
670 this.model.getChildAt(table, 0) != row) || mxUtils.intersects(box,
703 current = this.view.getState(this.model.getParent(current.cell));
856 this.graph.model.getParent(cells[i]) :
884 cell = this.graph.model.getParent(cell);
1146 cell = this.model.getParent(cell);
1215 graph.selectionCellsHandler.isHandled(graph.model.getParent(state.cell))));
2177 var model = this.model;
2179 return model.filterDescendants(function(cell)
2181 return (vertices && model.isVertex(cell)) || (edges && model.isEdge(cell));
2182 }, model.getRoot());
2250 this.model.getChildCount(cell) > 0)
2252 cell = this.model.getChildAt(cell, 0);
2261 this.model.getChildCount(cell) > 0)
2263 for (var i = 0; i < this.model.getChildCount(cell); i++)
2265 var temp = this.model.getChildAt(cell, i);
2290 var cellStyle = this.model.getStyle(cell);
2321 this.model.beginUpdate();
2342 this.model.endUpdate();
2405 var childCount = this.model.getChildCount(parent);
2409 var cell = this.model.getChildAt(parent, i);
2416 else if (this.isCellVisible(cell) && (edges && this.model.isEdge(cell) ||
2417 vertices && this.model.isVertex(cell)))
2438 return !this.isSwimlane(state.cell) && this.model.getChildCount(state.cell) > 0 &&
2476 var temp = this.model.getParent(cell);
2478 if (!this.model.isVertex(temp))
2927 var parent = this.graph.model.getParent(cell);
3089 if (this.model.isEdge(state.cell) &&
3095 else if (this.model.isVertex(state.cell) &&
3323 var model = this.model;
3326 for (var key in this.model.cells)
3328 var cell = this.model.cells[key];
3411 return !this.model.isEdge(cells[0]) &&
3439 ((this.model.isEdge(cell) && this.edgeLabelsMovable) ||
3440 (this.model.isVertex(cell) && (this.vertexLabelsMovable ||
3482 cell = this.model.getParent(cell);
3639 while (!this.model.isLayer(result))
3641 result = this.model.getParent(result);
3646 if (!this.model.isAncestor(result, cells[i]))
3665 var model = this.getModel();
3666 var childCount = model.getChildCount(model.root);
3682 model.isVisible(layer) ?
3706 if (model.isVisible(layer))
3720 model.setVisible(layer, !model.isVisible(layer));
3730 })(model.getChildAt(model.root, i)));
3788 current = this.model.getParent(current);
3825 var newCell = this.model.getCell(cells[i].id);
3847 if (cells.length == 2 && this.model.isVertex(cells[1]))
3880 layout = this.layoutManager.getLayout(this.model.getParent(source));
3896 if (source.geometry.relative && this.model.isEdge(source.parent))
3902 while (source.geometry.relative && this.model.isVertex(source.parent))
3937 var parentState = this.view.getState(this.model.getParent(source));
3943 if (parentState != null && this.model.isVertex(parentState.cell))
3950 if (this.model.isVertex(source.parent) && source.geometry.relative)
3969 …if (!this.isCellLocked(tempCells[i]) && !this.model.isEdge(tempCells[i]) && tempCells[i] != source)
3972 if (!this.model.isAncestor(source, tempCells[i]) && this.isContainer(tempCells[i]) &&
3973 (container == null || tempCells[i] == this.model.getParent(source)))
3979 !this.model.isAncestor(tempCells[i], source) &&
4023 this.model.beginUpdate();
4035 this.addCells([realTarget], this.model.getParent(source), null, null, null, true);
4078 (target == null && cloneSource)) ? null : this.insertEdge(this.model.getParent(source),
4090 tmp = this.model.getParent(tmp);
4096 this.model.add(tmp.parent, edge, index);
4105 this.model.add(source.parent, realTarget, index);
4130 this.model.endUpdate();
4164 for (var key in this.model.cells)
4166 var cell = this.model.cells[key];
4168 if (this.model.isVertex(cell) || this.model.isEdge(cell))
4197 var value = this.model.getValue(cell);
4216 current = this.model.getParent(current);
4298 var parent = this.model.getParent(cell);
4300 if (this.model.isVertex(parent) && this.isCellCollapsed(cell))
4321 var layout = this.layoutManager.getLayout(this.model.getParent(cell));
4361 this.model.beginUpdate();
4382 var parent = this.model.getParent(cells[i]);
4405 this.model.endUpdate();
4421 this.model.beginUpdate();
4438 this.model.setGeometry(cells[i], geo);
4445 this.model.endUpdate();
4456 this.model.beginUpdate();
4481 this.model.setGeometry(parent, pgeo);
4484 parent = this.model.getParent(parent);
4490 this.model.endUpdate();
5020 this.graph.model.addListener(mxEvent.CHANGE, this.repaintHandler);
5059 mxEvent.isTouchEvent(me.getEvent()) && !this.graph.model.isVertex(me.getCell()))
5131 if (this.graph.getSelectionCount() != 1 || !this.graph.model.isEdge(
5378 if (tmp != null && this.graph.model.isEdge(tmp.cell) && !this.graph.isCloneEvent(evt) &&
5439 this.graph.model.isVertex(this.currentState.cell) &&
5458 this.graph.model.getParent(this.currentState.cell));
5547 var geo = this.graph.model.isVertex(cell) && this.graph.getCellGeometry(cell);
5550 if (cell != null && !this.graph.model.isAncestor(cell, this.currentState.cell) &&
5614 …var bbox = (!this.graph.model.isEdge(this.currentState.cell)) ? mxRectangle.fromRectangle(this.cur…
5663 if (this.graph.isCellLocked(cell) || this.graph.model.isEdge(cell))
5693 this.graph.model.isEdge(state.cell.parent))
5831 var rows = this.model.getChildCells(table, true);
5842 var cells = this.model.getChildCells(rows[i], true);
5907 return this.model.isVertex(cell) && this.isTableRow(this.model.getParent(cell));
5915 return this.model.isVertex(cell) && this.isTable(this.model.getParent(cell));
5943 return this.model.isVertex(cell) && this.isStack(this.model.getParent(cell));
5952 var model = this.getModel();
5954 model.beginUpdate();
5964 model.setGeometry(row, rgeo);
5966 var table = model.getParent(row);
5967 var rows = model.getChildCells(table, true);
5985 model.setGeometry(nextRow, geo);
6005 model.setGeometry(table, tgeo);
6017 model.endUpdate();
6028 var model = this.getModel();
6029 var row = model.getParent(col);
6030 var table = model.getParent(row);
6031 var cells = model.getChildCells(row, true);
6035 model.beginUpdate();
6039 var rows = model.getChildCells(table, true);
6044 cells = model.getChildCells(row, true);
6058 model.setGeometry(cell, geo);
6082 model.setGeometry(cell, geo);
6096 model.setGeometry(table, tgeo);
6107 model.endUpdate();
6178 var cells = this.graph.model.getChildCells(row, true);
6208 var model = this.graph.getModel();
6209 var cells = model.getChildCells(row, true);
6259 model.setGeometry(cells[i], cell);
6286 model.setVisible(cells[i], visible);
6332 var model = this.graph.getModel();
6335 model.beginUpdate();
6340 var rows = model.getChildCells(parent, true);
6353 model.setGeometry(rows[rows.length - 1], row);
6383 model.setGeometry(rows[i], row);
6394 model.setGeometry(parent, table);
6401 model.setGeometry(parent, table);
6407 model.endUpdate();
6435 if (state != null && recurse && this.graph.model.isEdge(state.cell) &&
6445 if (state != null && recurse && this.graph.model.isEdge(state.cell) &&
6466 this.state.view.graph.model.isEdge(this.state.cell) &&
6508 if (this.graph.model.isEdge(state.cell) &&
7427 this.model.beginUpdate();
7432 if (this.model.isVertex(cells[i]) || this.model.isEdge(cells[i]))
7447 this.model.endUpdate();
7486 var childCount = this.model.getChildCount(cell);
7490 this.createCellLookup([this.model.getChildAt(cell, j)], lookup);
7548 this.model.beginUpdate();
7570 var children = this.model.getChildren(this.moveCells(
7571 [layers[i]], dx, dy, false, this.model.getRoot())[0]);
7605 this.model.endUpdate();
7632 var model = new mxGraphModel();
7633 var parent = model.getChildAt(model.getRoot(), 0);
7637 model.add(parent, clones[i]);
7646 if (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&
7647 dict.get(this.model.getParent(cells[i])) == null)
7660 return codec.encode(model);
7668 if (cell != null && this.model.getParent(cell) != this.model.getRoot() &&
7669 !this.model.isEdge(cell))
7686 var parent = this.model.getParent(cell);
7710 parent = this.model.getParent(edge);
7720 this.model.beginUpdate();
7726 this.model.setValue(newEdge, '');
7738 this.model.remove(sourceLabels[i]);
7750 this.model.remove(targetLabels[i]);
7763 var target = this.model.getTerminal(newEdge, false);
7781 this.model.endUpdate();
7807 (this.model.isVertex(temp) ||
7808 this.model.isEdge(temp)))
7824 for (var i = 0; i < this.model.getChildCount(temp); i++)
7826 flatten(this.model.getChildAt(temp, i));
7830 flatten(this.model.root);
7876 this.model.beginUpdate();
7879 this.model.setGeometry(target, ng1);
7880 this.model.setGeometry(cells[0], ng2);
7884 this.model.endUpdate();
7917 newCells = newCells.concat(this.model.getChildCells(cells[i], true).reverse());
7928 this.model.beginUpdate();
7939 var parent = this.model.getParent(cells[i]);
7960 this.model.setGeometry(parent, table);
7970 this.model.setGeometry(target, table);
7974 var rows = this.model.getChildCells(target, true);
7979 var sourceCols = this.model.getChildCells(cells[i], true);
7980 var cols = this.model.getChildCells(rows[0], true);
7993 this.model.add(cells[i], col);
8001 this.model.remove(sourceCols[sourceCols.length + j - 1]);
8006 sourceCols = this.model.getChildCells(cells[i], true);
8018 this.model.setGeometry(sourceCols[j], geo2);
8031 if (!clone && this.model.contains(sourceTables[i]) &&
8032 this.model.getChildCount(sourceTables[i]) == 0)
8034 this.model.remove(sourceTables[i]);
8046 this.model.endUpdate();
8060 this.model.beginUpdate();
8068 var row = this.model.getParent(cells[i]);
8069 var table = this.model.getParent(row);
8072 if (this.model.getChildCount(row) == 1 &&
8073 this.model.getChildCount(table) == 1)
8091 var table = this.model.getParent(cells[i]);
8096 var rows = this.model.getChildCells(table, true);
8122 this.model.endUpdate();
8151 var childCount = this.model.getChildCount(cell);
8156 this.model.getChildAt(cell, i));
8258 var childCount = this.model.getChildCount(cell);
8263 var child = this.model.getChildAt(cell, i);
8265 if (this.model.isVertex(child))
8321 var parent = this.model.getParent(cell);
8365 var model = this.getModel();
8368 model.beginUpdate();
8375 if (model.isEdge(cell))
8377 var src = model.getTerminal(cell, true);
8378 var trg = model.getTerminal(cell, false);
8380 model.setTerminal(cell, trg, true);
8381 model.setTerminal(cell, src, false);
8383 var geo = model.getGeometry(cell);
8399 model.setGeometry(cell, geo);
8424 else if (model.isVertex(cell))
8440 model.setGeometry(cell, geo);
8464 model.endUpdate();
8509 cell = this.model.getParent(cell);
8514 cell = this.model.getParent(cell);
8542 var desc = this.model.getDescendants(cell);
8639 this.model.beginUpdate();
8653 if (current == this.model.getRoot() || (current.value != null &&
8661 current = this.model.getParent(current);
8684 this.model.endUpdate();
8707 var parent = this.model.getParent(cells[i]);
8720 if (state != null && (this.model.isEdge(state.cell) ||
8721 this.model.isVertex(state.cell)) &&
8727 for (var j = 0; j < this.model.getChildCount(state.cell) && allChildren; j++)
8729 if (!dict.get(this.model.getChildAt(state.cell, j)))
8832 this.model.setValue(cell, value);
8841 var model = this.getModel();
8852 var parent = this.model.getParent(cells[i]);
8854 if (this.model.isEdge(parent) && mxUtils.indexOf(cells, parent) < 0)
8874 target = this.model.getParent(target);
8879 target = this.model.getParent(target);
8923 if (evt != null && !this.model.isVertex(cell))
8925 var state = (this.model.isEdge(cell)) ? this.view.getState(cell) : null;
9035 if (state != null && this.model.isEdge(state.cell))
9113 this.model.addListener(mxEvent.CHANGE, checkLinks);
9143 … tmp = (tmp != null && !graph.model.isAncestor(cell, tmp.cell)) ? null : graph.view.getState(cell);
9335 cells[i] = this.model.getParent(cells[i]);
9339 cells = this.model.getTopmostCells(cells);
9341 var model = this.getModel();
9345 model.beginUpdate();
9355 var parent = model.getParent(cells[i]);
9364 model.add(parent, clones[i]);
9370 model.add(parent, clones[i], index + 1);
9383 model.setGeometry(parent, table);
9399 model.endUpdate();
9589 var pstate = this.view.getState(this.model.getParent(vertices[i].cell));
9905 var parent = graph.model.getParent(state.cell);
9913 parent = graph.model.getParent(parent);
9922 imgExport.drawState(this.getView().getState(this.model.root), svgCanvas);
10160 this.model.beginUpdate();
10166 var parent = this.model.getParent(cells[i]);
10177 this.model.setGeometry(parent, table);
10182 var parents = (this.selectParentAfterDelete) ? this.model.getParents(cells) : null;
10187 this.model.endUpdate();
10197 if (this.model.contains(parents[i]) &&
10198 (this.model.isVertex(parents[i]) ||
10199 this.model.isEdge(parents[i])))
10215 var model = this.getModel();
10216 model.beginUpdate();
10225 var row = model.getParent(cell);
10226 table = model.getParent(row);
10227 index = mxUtils.indexOf(model.getChildCells(row, true), cell);
10233 table = model.getParent(cell);
10237 cell = model.getChildCells(table, true)[0];
10242 index = model.getChildCells(cell, true).length - 1;
10246 var rows = model.getChildCells(table, true);
10251 var child = model.getChildCells(rows[i], true)[index];
10252 var clone = model.cloneCell(child, false);
10267 model.add(rows[i], clone, index + ((before) ? 0 : 1));
10277 model.setGeometry(table, tableGeo);
10282 model.endUpdate();
10291 var model = this.getModel();
10292 model.beginUpdate();
10306 pool = model.getParent(lane);
10309 var lanes = model.getChildCells(pool, true);
10313 model.remove(pool);
10322 model.remove(lane);
10327 model.endUpdate();
10336 var model = this.getModel();
10337 model.beginUpdate();
10348 var lanes = model.getChildCells(pool, true);
10353 pool = model.getParent(lane);
10357 lane = model.cloneCell(lane, false);
10359 model.add(pool, lane, index + ((before) ? 0 : 1));
10363 model.endUpdate();
10372 var model = this.getModel();
10373 model.beginUpdate();
10382 row = model.getParent(cell);
10383 table = model.getParent(row);
10387 table = model.getParent(cell);
10391 var rows = model.getChildCells(table, true);
10395 var cells = model.getChildCells(row, true);
10397 row = model.cloneCell(row, false);
10406 var cell = model.cloneCell(cells[i], false);
10418 model.add(table, row, index + ((before) ? 0 : 1));
10427 model.setGeometry(table, tableGeo);
10433 model.endUpdate();
10442 var model = this.getModel();
10443 model.beginUpdate();
10452 row = model.getParent(cell);
10457 table = model.getParent(row);
10460 var rows = model.getChildCells(table, true);
10464 model.remove(table);
10473 var cells = model.getChildCells(row, true);
10477 model.remove(table);
10492 var child = model.getChildCells(rows[i], true)[index];
10493 model.remove(child);
10510 model.setGeometry(table, tableGeo);
10517 model.endUpdate();
10526 var model = this.getModel();
10527 model.beginUpdate();
10536 row = model.getParent(cell);
10542 table = model.getParent(row);
10545 var rows = model.getChildCells(table, true);
10549 model.remove(table);
10558 model.remove(row);
10575 model.setGeometry(table, tableGeo);
10581 model.endUpdate();
11532 this.graph.model.getChildCount(state.cell) == 0 &&
11673 var parent = this.graph.model.getParent(cell);
11696 this.graph.model.setGeometry(parent, geo);
11710 var model = this.graph.model;
11728 addCell(model.getParent(model.getParent(cell)));
11732 addCell(model.getParent(cell));
11795 return (!(!this.graph.isSwimlane(state.cell) && this.graph.model.getChildCount(state.cell) > 0 &&
11822 …return this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.c…
11893 var model = graph.model;
11904 var rows = graph.view.getCellStates(model.getChildCells(this.state.cell, true));
11908 var cols = model.getChildCells(rows[0].cell, true);
12107 var model = graph.model;
12123 for (var i = 0; i < model.getChildCount(this.state.cell); i++)
12127 if (rowState != null && model.isVertex(rowState.cell))
12175 }))(this.graph.view.getState(model.getChildAt(this.state.cell, i)));
12629 this.graph.model.beginUpdate();
12645 this.graph.model.setGeometry(cells[i], geo);
12652 this.graph.model.endUpdate();
12861 var model = this.graph.getModel();
12862 var parent = model.getParent(cells[0]);
12865 if (model.isEdge(parent) && geo != null && geo.relative)
12904 var model = this.graph.getModel();
12905 var parent = model.getParent(state.cell);
12908 …if (model.isEdge(parent) && geo != null && geo.relative && state.width < 2 && state.height < 2 && …
12925 var model = this.graph.getModel();
12926 var parent = model.getParent(this.state.cell);
12932 if (handle == mxEvent.ROTATION_HANDLE || !model.isEdge(parent) || geo == null || !geo.relative ||
12945 if (this.state.view.graph.model.isVertex(this.state.cell) &&