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

2  * Copyright (c) 2006-2012, JGraph Ltd
28 var t = this.view.translate;
29 var s = this.view.scale;
33 (t.x + img.x) * s, (t.y + img.y) * s,
46 // Pre-fetches submenu image or replaces with embedded image if supported
56 // Pre-fetches connect image
97 var state = graph.view.getState(cell);
376 // And uses built-in context menu while editing
421 // Improves line wrapping for in-place editor
422 if (mxClient.IS_SVG && graph.view.getDrawPane() != null)
424 var root = graph.view.getDrawPane().ownerSVGElement;
451 // Adds tooltip when mouse is over scrollbars to show space-drag panning option
456 if (mxEvent.getClientX(evt) - off.x - this.diagramContainer.clientWidth > 0 ||
457 mxEvent.getClientY(evt) - off.y - this.diagramContainer.clientHeight > 0)
723 ui.hoverIcons.update(graph.view.getState(cells[cells.length - 1]));
835 edgeStyleDiv.className = 'geSprite geSprite-curved';
840 edgeStyleDiv.className = 'geSprite geSprite-straight';
844 edgeStyleDiv.className = 'geSprite geSprite-entity';
848 … edgeStyleDiv.className = 'geSprite geSprite-' + ((graph.currentEdgeStyle['elbow'] == 'vertical') ?
853 … edgeStyleDiv.className = 'geSprite geSprite-' + ((graph.currentEdgeStyle['elbow'] == 'vertical') ?
858 edgeStyleDiv.className = 'geSprite geSprite-orthogonal';
869 edgeShapeDiv.className = 'geSprite geSprite-linkedge';
873 edgeShapeDiv.className = 'geSprite geSprite-arrow';
877 edgeShapeDiv.className = 'geSprite geSprite-simplearrow';
881 edgeShapeDiv.className = 'geSprite geSprite-connection';
984 … http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-l…
1008 graph.view.validateBackground();
1013 graph.view.validateBackground();
1023 graph.view.validateBackground();
1086 EditorUi.prototype.hsplitPosition = (screen.width <= 640) ? 118 : ((urlParams['sidebar-entries'] !=…
1117 if (urlParams['shape-picker'] != '0')
1217 graph.view.addListener(mxEvent.SCALE, hidePicker);
1218 graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE, hidePicker);
1246 ui.showShapePicker(pt.x, pt.y);
1275 …ell, dir, this.graph.defaultEdgeLength, evt, null, null, mxUtils.bind(this, function(x, y, execute) argument
1297 ui.hoverIcons.update(graph.view.getState(cell));
1329 var x = graph.container.scrollLeft + rect.x - offset.x;
1330 var y = graph.container.scrollTop + rect.y - offset.y;
1334 var div = ui.showShapePicker(x, y, temp, mxUtils.bind(this, function(cell)
1338 …graph.connectVertex(temp, dir, graph.defaultEdgeLength, mouseEvent, true, true, function(x, y, exe… argument
1344 ui.hoverIcons.update(graph.view.getState(cell));
1353 this.centerShapePicker(div, rect, x, y, dir);
1379 * Creates a temporary graph instance for rendering off-screen content.
1381 EditorUi.prototype.centerShapePicker = function(div, rect, x, y, dir) argument
1392 x -= r2.width / 2 - 10;
1393 y -= r2.height + 6;
1397 x -= r2.width / 2 - 10;
1402 x -= r2.width + 6;
1403 y -= r2.height / 2 - 10;
1407 x += rect.width + 6;
1408 y -= r2.height / 2 - 10;
1411 div.style.left = x + 'px';
1416 * Creates a temporary graph instance for rendering off-screen content.
1418 EditorUi.prototype.showShapePicker = function(x, y, source, callback, direction, hovering) argument
1420 var div = this.createShapePicker(x, y, source, callback, direction, mxUtils.bind(this, function()
1446 * Creates a temporary graph instance for rendering off-screen content.
1448 EditorUi.prototype.createShapePicker = function(x, y, source, callback, direction, afterClick, cell… argument
1457 var sourceState = graph.view.getState(source);
1465 div.style.cssText = 'position:absolute;left:' + x + 'px;top:' + y +
1466 'px;width:' + w + 'px;border-radius:10px;padding:4px;text-align:center;' +
1467 'box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;' +
1468 'z-index: ' + mxPopupMenu.prototype.zIndex + 1 + ';';
1472 mxUtils.setPrefixedStyle(div.style, 'transform', 'translate(-22px,-22px)');
1487 node.style.cssText = 'position:relative;display:inline-block;position:relative;' +
1512 clone.geometry.x = graph.snap(Math.round(x / graph.view.scale) -
1513 graph.view.translate.x - cell.geometry.width / 2);
1514 clone.geometry.y = graph.snap(Math.round(y / graph.view.scale) -
1515 graph.view.translate.y - cell.geometry.height / 2);
1533 ui.hoverIcons.update(graph.view.getState(clone));
1550 var dy = div.offsetTop + div.clientHeight - b;
1554 div.style.top = Math.max(graph.container.scrollTop + 22, y - dy) + 'px';
1558 var dx = div.offsetLeft + div.clientWidth - r;
1562 div.style.left = Math.max(graph.container.scrollLeft + 22, x - dx) + 'px';
1570 * Creates a temporary graph instance for rendering off-screen content.
1599 * Creates a temporary graph instance for rendering off-screen content.
1725 'geSprite geSprite-' + prefix + 'blocktrans' : 'geSprite geSprite-noarrow';
1732 result = 'geSprite geSvgSprite geSprite-' + marker + ((prefix == 'end') ? ' geFlipSprite' : '');
1736 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'classic' : 'geSprite geSprite-' + prefix…
1740 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'classicthin' : 'geSprite geSprite-' + pr…
1744 result = 'geSprite geSprite-' + prefix + 'open';
1748 result = 'geSprite geSprite-' + prefix + 'openthin';
1752 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'block' : 'geSprite geSprite-' + prefix +…
1756 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'blockthin' : 'geSprite geSprite-' + pref…
1760 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'oval' : 'geSprite geSprite-' + prefix + …
1764 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'diamond' : 'geSprite geSprite-' + prefix…
1768 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'thindiamond' : 'geSprite geSprite-' + pr…
1772 result = 'geSprite geSprite-' + prefix + 'openasync';
1776 result = 'geSprite geSprite-' + prefix + 'dash';
1780 result = 'geSprite geSprite-' + prefix + 'cross';
1784 …result = (fill == '1') ? 'geSprite geSprite-' + prefix + 'async' : 'geSprite geSprite-' + prefix +…
1788 …ill == '1' || marker == 'circle') ? 'geSprite geSprite-' + prefix + 'circle' : 'geSprite geSprite-
1792 result = 'geSprite geSprite-' + prefix + 'erone';
1796 result = 'geSprite geSprite-' + prefix + 'eronetoone';
1800 result = 'geSprite geSprite-' + prefix + 'ermany';
1804 result = 'geSprite geSprite-' + prefix + 'eronetomany';
1808 result = 'geSprite geSprite-' + prefix + 'eroneopt';
1812 result = 'geSprite geSprite-' + prefix + 'ermanyopt';
1816 result = 'geSprite geSprite-noarrow';
1897 var state = graph.view.getState(result[i]);
1908 geo.x = state.x / state.view.scale - state.view.translate.x;
1909 geo.y = state.y / state.view.scale - state.view.translate.y;
1984 // Initial page layout view, scrollBuffer and timer-based scrolling
1989 * Returns the padding for pages in page view with scrollbars.
1993 return new mxPoint(Math.max(0, Math.round((graph.container.offsetWidth - 34) / graph.view.scale)),
1994 Math.max(0, Math.round((graph.container.offsetHeight - 34) / graph.view.scale)));
1998 graph.view.getBackgroundPageBounds = function()
2003 return new mxRectangle(this.scale * (this.translate.x + layout.x * page.width),
2030 … var bds = (graph.pageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
2032 var tr = graph.view.translate;
2033 var s = graph.view.scale;
2037 b.x = b.x / s - tr.x;
2038 b.y = b.y / s - tr.y;
2051 var cw = graph.container.offsetWidth - sb;
2052 var ch = graph.container.offsetHeight - sb;
2055 var dx = ((cw - ns * b.width) / 2) / ns;
2056 …var dy = (this.lightboxVerticalDivider == 0) ? 0 : ((ch - ns * b.height) / this.lightboxVerticalDi…
2066 graph.view.scaleAndTranslate(ns, Math.floor(dx - b.x), Math.floor(dy - b.y));
2072 var t = graph.view.translate;
2073 graph.view.setTranslate(Math.floor(t.x + cx / s), Math.floor(t.y + cy / s));
2116 // Creates toolbar for viewer - do not use CSS here
2120 var toolbarConfig = JSON.parse(decodeURIComponent(urlParams['toolbar-config'] || '{}'));
2125 this.chromelessToolbar.style.boxSizing = 'border-box';
2141 … mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transition', 'opacity 600ms ease-in-out');
2153 … this.chromelessToolbar.style.bottom = ((css != null) ? parseInt(css['margin-bottom'] || 0) : 0) +
2209 pageInfo.style.display = 'inline-block';
2252 pageInfo.style.display = 'inline-block';
2284 if (graph.view.scale == 1)
2397 // Puts the dialog on top of the container z-index
2508 mxUtils.setPrefixedStyle(this.chromelessToolbar.style, 'transform', 'translate(-50%,0)');
2589 if ((Math.abs(this.scrollLeft - graph.container.scrollLeft) < tol &&
2590 Math.abs(this.scrollTop - graph.container.scrollTop) < tol) &&
2591 (Math.abs(this.startX - me.getGraphX()) < tol &&
2592 Math.abs(this.startY - me.getGraphY()) < tol))
2621 var graphViewValidate = graph.view.validate;
2622 graph.view.validate = function()
2631 var tx = this.translate.x;
2633 this.translate.x = pad.x - (this.x0 || 0) * size.width;
2634 this.translate.y = pad.y - (this.y0 || 0) * size.height;
2653 var minw = Math.ceil(2 * pad.x + pages.width * size.width);
2665 // Updates auto-translate to include padding and graph size
2666 var dx = pad.x - pages.x * size.width;
2667 var dy = pad.y - pages.y * size.height;
2669 if (!this.autoTranslate && (this.view.translate.x != dx || this.view.translate.y != dy))
2672 this.view.x0 = pages.x;
2673 this.view.y0 = pages.y;
2677 // SHOULD MOVE TRANSLATE/SCALE TO VIEW.
2678 var tx = graph.view.translate.x;
2679 var ty = graph.view.translate.y;
2680 graph.view.setTranslate(dx, dy);
2683 graph.container.scrollLeft += Math.round((dx - tx) * graph.view.scale);
2684 graph.container.scrollTop += Math.round((dy - ty) * graph.view.scale);
2704 var bgGroup = graph.view.getBackgroundPane();
2705 var mainGroup = graph.view.getDrawPane();
2729 if (graph.view.backgroundPageShape != null && graph.view.backgroundPageShape.node != null)
2731 … mxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform-origin', null);
2732 mxUtils.setPrefixedStyle(graph.view.backgroundPageShape.node.style, 'transform', null);
2758 graph.view.getDecoratorPane().style.opacity = '';
2759 graph.view.getOverlayPane().style.opacity = '';
2764 var prev = graph.view.scale;
2770 dx = graph.container.offsetWidth / 2 - cursorPosition.x + offset.x;
2771 dy = graph.container.offsetHeight / 2 - cursorPosition.y + offset.y;
2775 var s = graph.view.scale;
2781 dx += sp.x - scrollPosition.x;
2782 dy += sp.y - scrollPosition.y;
2787 ui.chromelessResize(false, null, dx * (graph.cumulativeZoomFactor - 1),
2788 dy * (graph.cumulativeZoomFactor - 1));
2793 graph.container.scrollLeft -= dx * (graph.cumulativeZoomFactor - 1);
2794 graph.container.scrollTop -= dy * (graph.cumulativeZoomFactor - 1);
2829 if (!mxClient.IS_IOS && Date.now() - lastZoomEvent < 15)
2839 if (this.view.scale * this.cumulativeZoomFactor <= 0.15)
2841 this.cumulativeZoomFactor *= (this.view.scale + 0.05) / this.view.scale;
2848 …this.cumulativeZoomFactor = Math.round(this.view.scale * this.cumulativeZoomFactor * 20) / 20 / th…
2853 if (this.view.scale * this.cumulativeZoomFactor <= 0.15)
2855 this.cumulativeZoomFactor *= (this.view.scale - 0.05) / this.view.scale;
2862 …this.cumulativeZoomFactor = Math.round(this.view.scale * this.cumulativeZoomFactor * 20) / 20 / th…
2866 …lativeZoomFactor = Math.max(0.05, Math.min(this.view.scale * this.cumulativeZoomFactor, 160)) / th…
2879 cursorPosition.x + graph.container.scrollLeft - graph.container.offsetLeft;
2881 cursorPosition.y + graph.container.scrollTop - graph.container.offsetTop;
2887 if (graph.view.backgroundPageShape != null && graph.view.backgroundPageShape.node != null)
2889 var page = graph.view.backgroundPageShape.node;
2891 mxUtils.setPrefixedStyle(page.style, 'transform-origin',
2892 ((ignoreCursorPosition) ? ((graph.container.clientWidth / 2 + graph.container.scrollLeft -
2893 page.offsetLeft) + 'px') : ((cursorPosition.x + graph.container.scrollLeft -
2894 page.offsetLeft - graph.container.offsetLeft) + 'px')) + ' ' +
2895 ((ignoreCursorPosition) ? ((graph.container.clientHeight / 2 + graph.container.scrollTop -
2896 page.offsetTop) + 'px') : ((cursorPosition.y + graph.container.scrollTop -
2897 page.offsetTop - graph.container.offsetTop) + 'px')));
2902 graph.view.getDecoratorPane().style.opacity = '0';
2903 graph.view.getOverlayPane().style.opacity = '0';
2947 var t = graph.view.getTranslate();
2948 var step = 40 / graph.view.scale;
2952 graph.view.setTranslate(t.x, t.y + ((up) ? step : -step));
2956 graph.view.setTranslate(t.x + ((up) ? -step : step), t.y);
2993 * Creates a temporary graph instance for rendering off-screen content.
3005 * Creates a temporary graph instance for rendering off-screen content.
3009 return this.editor.editable || urlParams['hide-pages'] != '1';
3013 * Creates a temporary graph instance for rendering off-screen content.
3060 this.editor.graph.view.setScale(1);
3082 * @param {number} dx X-coordinate of the translation.
3083 * @param {number} dy Y-coordinate of the translation.
3134 // Cross-domain window access is not allowed in FF, so if we
3170 this.editor.graph.view.validate();
3181 EditorUi.prototype.showPopupMenu = function(fn, x, y, evt) argument
3198 menu.popup(x, y, null, evt);
3243 title += ' - ' + this.editor.appName;
3379 graph.view.scaleAndTranslate(1, 0, 0);
3408 graph.view.setTranslate(0, 0);
3418 graph.container.scrollTop = Math.floor(pad.y - this.editor.initialTopSpacing) - 1;
3419 graph.container.scrollLeft = Math.floor(Math.min(pad.x,
3420 (graph.container.scrollWidth - graph.container.clientWidth) / 2)) - 1;
3427 if (bounds.x > graph.container.scrollLeft + graph.container.clientWidth * 0.9)
3429 …graph.container.scrollLeft = Math.min(bounds.x + bounds.width - graph.container.clientWidth, bound…
3434 …ontainer.scrollTop = Math.min(bounds.y + bounds.height - graph.container.clientHeight, bounds.y -
3441 var width = Math.max(bounds.width, graph.scrollTileSize.width * graph.view.scale);
3442 var height = Math.max(bounds.height, graph.scrollTileSize.height * graph.view.scale);
3443 …ontainer.scrollTop = Math.floor(Math.max(0, bounds.y - Math.max(20, (graph.container.clientHeight
3444 …container.scrollLeft = Math.floor(Math.max(0, bounds.x - Math.max(0, (graph.container.clientWidth
3449 …var b = mxRectangle.fromRectangle((graph.pageVisible) ? graph.view.getBackgroundPageBounds() : gra…
3450 var tr = graph.view.translate;
3451 var s = graph.view.scale;
3452 b.x = b.x / s - tr.x;
3453 b.y = b.y / s - tr.y;
3457 … var dy = (graph.pageVisible) ? 0 : Math.max(0, (graph.container.clientHeight - b.height) / 4);
3459 graph.view.setTranslate(Math.floor(Math.max(0,
3460 (graph.container.clientWidth - b.width) / 2) - b.x + 2),
3461 Math.floor(dy - b.y + 1));
3478 tx = graph.view.translate.x * graph.view.scale - graph.container.scrollLeft;
3479 ty = graph.view.translate.y * graph.view.scale - graph.container.scrollTop;
3485 graph.view.validateBackground();
3500 graph.container.scrollLeft = graph.view.translate.x * graph.view.scale - tx;
3501 graph.container.scrollTop = graph.view.translate.y * graph.view.scale - ty;
3524 var temp = this.ui.editor.graph.view.gridColor;
3647 this.editor.graph.view.validateBackground();
3658 this.editor.graph.view.revalidate();
3679 this.editor.graph.view.validateBackground();
3700 this.editor.graph.view.validateBackground();
3712 this.editor.graph.view.gridColor = value;
3713 this.editor.graph.view.validateBackground();
3834 var state = graph.view.getState(graph.getSelectionCell());
3835 this.menus.get('navigation').setEnabled(selected || graph.view.currentRoot != null);
3838 this.actions.get('home').setEnabled(graph.view.currentRoot != null);
3839 this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
3888 … http://stackoverflow.com/questions/19012135/ios-7-ipad-safari-landscape-innerheight-outerheight-l…
3896 off = document.documentElement.clientHeight - window.innerHeight;
3901 var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
3927 sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
3972 this.diagramContainer.style.left = (contLeft + diagContOffset.x) + 'px';
4019 this.footerContainer.style.zIndex = mxPopupMenu.prototype.zIndex - 3;
4208 // Disables built-in pan and zoom in IE10 and later
4221 result = result + dx - this.footerHeight;
4232 onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
4262 var next = (last != null) ? last - dx : 0;
4280 * @param {number} dx X-coordinate of the translation.
4281 * @param {number} dy Y-coordinate of the translation.
4310 * @param {number} dx X-coordinate of the translation.
4311 * @param {number} dy Y-coordinate of the translation.
4360 this.dialog = (this.dialogs.length > 0) ? this.dialogs[this.dialogs.length - 1] : null;
4536 var asHtml = elt.getAttribute('data-type') != 'text/plain';
4549 if (idx >= 0 && idx < xml.length - 3)
4630 elt.innerHTML = ((hasMeta) ? '<meta charset="utf-8">' : '') +
4723 elt.setAttribute('data-type', 'text/plain');
5023 this.editor.graph.view.validateBackgroundImage();
5068 88: 'copySize', // Alt+Shift+X
5102 // Routes command-key to control-key on Mac
5137 geo.width = Math.max(0, geo.width - stepSize);
5141 geo.height = Math.max(0, geo.height - stepSize);
5182 graph.model.add(parent, cell, Math.max(0, index - 1));
5208 dx = -stepSize;
5212 dy = -stepSize;
5292 graph.setSelectionCell(cells[cells.length - 1]);
5299 editorUi.hoverIcons.update(graph.view.getState(graph.getSelectionCell()));
5422 keyHandler.bindAction(88, true, 'cut'); // Ctrl+X