Lines Matching +full:x +full:- +full:view

2  * Copyright (c) 2006-2017, JGraph Ltd
3 * Copyright (c) 2006-2017, Gaudenz Alder
180 var pstate = graph.view.getState(parent);
196 var pstate = graph.view.getState(parent);
198 var state = graph.view.getState(parent);
264 }, null, null, 'Alt+Shift+X');
420 ui.hoverIcons.getStateAt = function(state, x, y) argument
422 return (isTreeVertex(state.cell)) ? null : this.graph.view.getState(this.graph.getCellAt(x, y));
435 var state = graph.view.getState(cell);
506 // Applies distance between previous and current parent for non-sidebar drags
507 if (newSource != null && target != newSource && this.view.getState(cells[0]) != null)
513 var state1 = graph.view.getState(graph.model.getTerminal(edges[0], true));
517 var state2 = graph.view.getState(newSource);
521 dx = (state2.getCenterX() - state1.getCenterX()) / graph.view.scale;
522 dy = (state2.getCenterY() - state1.getCenterY()) / graph.view.scale;
637 var state = graph.view.getState(cell);
645 var edgeState = graph.view.getState(edges[0]);
653 var pt = abs[abs.length - 1];
657 if (pt.y == state.y && Math.abs(pt.x - state.getCenterX()) < state.width / 2)
661 … else if (pt.y == state.y + state.height && Math.abs(pt.x - state.getCenterX()) < state.width / 2)
665 else if (pt.x > state.getCenterX())
694 clones[1].geometry.x += (after) ? cell.geometry.width + spacing :
695 -clones[1].geometry.width - spacing;
700 -clones[1].geometry.height - spacing;
703 if (graph.view.currentRoot != parent)
705 clones[1].geometry.x -= pgeo.x;
706 clones[1].geometry.y -= pgeo.y;
710 var state = graph.view.getState(cell);
711 var s = graph.view.scale;
720 bbox.x += ((after) ? cell.geometry.width + spacing :
721 -clones[1].geometry.width - spacing) * s;
726 -clones[1].geometry.height - spacing) * s;
743 var sibling = graph.view.getState(temp);
752 dx = spacing + Math.max(dx, (Math.min(bbox.x + bbox.width,
753 sibling.x + sibling.width) - Math.max(bbox.x, sibling.x)) / s);
755 sibling.y + sibling.height) - Math.max(bbox.y, sibling.y)) / s);
777 var sibling = graph.view.getState(temp);
803 graph.moveCells(subtree, ((after) ? 1 : -1) * dx, ((after) ? 1 : -1) * dy);
836 if (graph.view.currentRoot != parent)
838 clones[1].geometry.x -= pgeo.x;
839 clones[1].geometry.y -= pgeo.y;
869 dy = -dy;
873 dx = -dx;
950 if (graph.view.currentRoot == parent)
965 var bbox = graph.view.getBounds(targets);
966 var tr = graph.view.translate;
967 var s = graph.view.scale;
971 clones[1].geometry.x = (bbox == null) ? cell.geometry.x + (cell.geometry.width -
972 clones[1].geometry.width) / 2 : (bbox.x + bbox.width) / s - tr.x -
973 pgeo.x + spacing;
974 clones[1].geometry.y += clones[1].geometry.height - pgeo.y + level;
978 clones[1].geometry.x = (bbox == null) ? cell.geometry.x + (cell.geometry.width -
979 clones[1].geometry.width) / 2 : (bbox.x + bbox.width) / s - tr.x + -
980 pgeo.x + spacing;
981 clones[1].geometry.y -= clones[1].geometry.height + pgeo.y + level;
985 clones[1].geometry.x -= clones[1].geometry.width + pgeo.x + level;
986 clones[1].geometry.y = (bbox == null) ? cell.geometry.y + (cell.geometry.height -
987 clones[1].geometry.height) / 2 : (bbox.y + bbox.height) / s - tr.y + -
992 clones[1].geometry.x += clones[1].geometry.width - pgeo.x + level;
993 clones[1].geometry.y = (bbox == null) ? cell.geometry.y + (cell.geometry.height -
994 clones[1].geometry.height) / 2 : (bbox.y + bbox.height) / s - tr.y + -
1009 var state = graph.view.getState(ref);
1016 var temp = graph.view.getState(graph.model.getTerminal(sib[i], false));
1018 if (temp != null && ((!horizontal && (Math.min(temp.x + temp.width,
1019 state.x + state.width) >= Math.max(temp.x, state.x))) ||
1029 return (horizontal) ? a.x + a.width - b.x - b.width : a.y + a.height - b.y - b.height;
1062 var state = graph.view.getState(cell);
1070 … += (direction == mxConstants.DIRECTION_NORTH || direction == mxConstants.DIRECTION_WEST) ? -1 : 1;
1072 if (idx >= 0 && idx <= targets.length - 1)
1083 var altShiftActions = {88: ui.actions.get('selectChildren'), // Alt+Shift+X
1122 graph.setSelectionCell(cells[cells.length - 1]);
1127 ui.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
1285 this.moveHandle.style.left = this.state.x + this.state.width +
1462 edge.geometry.setTerminalPoint(new mxPoint(-40, 40), true);
1480 edge.geometry.setTerminalPoint(new mxPoint(-40, 40), true);
1571 edge.geometry.setTerminalPoint(new mxPoint(110, -40), true);
1583 edge2.geometry.setTerminalPoint(new mxPoint(110, -40), true);