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

2  * Copyright (c) 2006-2012, JGraph Ltd
62 * Counts open editor tabs (must be global for cross-window access)
66 // Cross-domain window access is not allowed in FF, so if we
76 // Workaround for possible infinite loop in FF https://drawio.atlassian.net/browse/DS-795
98 …efaultHtmlFont = '-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, u…
173 …{val: 'zigzag', dispName: 'ZigZag'}, {val: 'cross-hatch', dispName: 'Cross Hatch'}, {val: 'dots', …
174 {val: 'dashed', dispName: 'Dashed'}, {val: 'zigzag-line', dispName: 'ZigZag Line'}];
312 * Specifies the top spacing for the initial page view. Default is 0.
448 this.graph.currentTranslate.x = 0;
451 this.graph.view.setScale(1);
549 this.graph.view.scale = 1;
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);
644 graph.view.validateBackground();
705 if (graph.view.getState(cand[i]) != null)
820 var left = Math.max(1, Math.round((ds.width - w - padding) / 2));
821 var top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
826 w = (document.body != null) ? Math.min(w, document.body.scrollWidth - padding) : w;
827 h = Math.min(h, dh - padding);
842 this.bg.style.zIndex = this.zIndex - 2;
848 this.bg.style.left = origin.x + 'px';
850 left += origin.x;
857 left += editorUi.embedViewport.x;
867 left = pos.x;
880 if (!noScroll && elt.clientHeight > div.clientHeight - padding)
896 img.style.left = (left + w + 38 - dx) + 'px';
947 left = Math.max(1, Math.round((ds.width - w - padding) / 2));
948 top = Math.max(1, Math.round((dh - h - editorUi.footerHeight) / 3));
949 w = (document.body != null) ? Math.min(w0, document.body.scrollWidth - padding) : w0;
950 h = Math.min(h0, dh - padding);
953 left = pos.x;
962 if (!noScroll && elt.clientHeight > div.clientHeight - padding)
970 this.dialogImg.style.left = (left + w + 38 - dx) + 'px';
990 Dialog.prototype.zIndex = mxPopupMenu.prototype.zIndex - 2;
1281 // Overall scale for print-out to account for print borders in dialogs etc
1325 x0 -= layout.x * pf.width;
1326 y0 -= layout.y * pf.height;
1446 doc.writeln(' body > div { padding:30px;box-sizing:content-box; }');
1509 backgroundButton.style.backgroundRepeat = 'no-repeat';
1514 backgroundButton.style.top = '-6px';
1701 var formatName = 'format-' + namePostfix;
1750 mxUtils.write(customDiv, ' in x ');
1978 …return [{key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PO…
1979 {key: 'legal', title: 'US-Legal (8,5" x 14")', format: new mxRectangle(0, 0, 850, 1400)},
1980 … {key: 'tabloid', title: 'US-Tabloid (11" x 17")', format: new mxRectangle(0, 0, 1100, 1700)},
1981 … {key: 'executive', title: 'US-Executive (7" x 10")', format: new mxRectangle(0, 0, 700, 1000)},
1982 {key: 'a0', title: 'A0 (841 mm x 1189 mm)', format: new mxRectangle(0, 0, 3300, 4681)},
1983 {key: 'a1', title: 'A1 (594 mm x 841 mm)', format: new mxRectangle(0, 0, 2339, 3300)},
1984 {key: 'a2', title: 'A2 (420 mm x 594 mm)', format: new mxRectangle(0, 0, 1654, 2336)},
1985 {key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1654)},
1986 {key: 'a4', title: 'A4 (210 mm x 297 mm)', format: mxConstants.PAGE_FORMAT_A4_PORTRAIT},
1987 {key: 'a5', title: 'A5 (148 mm x 210 mm)', format: new mxRectangle(0, 0, 583, 827)},
1988 {key: 'a6', title: 'A6 (105 mm x 148 mm)', format: new mxRectangle(0, 0, 413, 583)},
1989 {key: 'a7', title: 'A7 (74 mm x 105 mm)', format: new mxRectangle(0, 0, 291, 413)},
1990 {key: 'b4', title: 'B4 (250 mm x 353 mm)', format: new mxRectangle(0, 0, 980, 1390)},
1991 {key: 'b5', title: 'B5 (176 mm x 250 mm)', format: new mxRectangle(0, 0, 690, 980)},
1992 {key: '16-9', title: '16:9 (1600 x 900)', format: new mxRectangle(0, 0, 900, 1600)},
1993 {key: '16-10', title: '16:10 (1920 x 1200)', format: new mxRectangle(0, 0, 1200, 1920)},
1994 {key: '4-3', title: '4:3 (1600 x 1200)', format: new mxRectangle(0, 0, 1200, 1600)},
2086 // IE 10 does not implement pointer-events so it can't have a drop highlight
2105 if (mxUtils.indexOf(evt.dataTransfer.types, 'text/uri-list') >= 0)
2107 nameInput.value = decodeURIComponent(evt.dataTransfer.getData('text/uri-list'));
2154 nameInput.style.width = (w != null) ? (w - 40) + 'px' : '190px';
2240 hint.style.backgroundRepeat = 'no-repeat';
2256 nameInput.value.length - hints[i].ext.length - 1) == '.' + hints[i].ext)
2355 if (name.substring(name.length - ext.length - 1) == '.' + ext ||
2356 (subExt != null && name.substring(name.length - subExt.length - 1) == '.' + subExt))
2498 if (graph.view.backgroundPageShape != null)
2502 x0 = 1 + bds.x;
2507 position = -Math.round(phase - mxUtils.mod(this.translate.x * this.scale - x0, phase)) + 'px ' +
2508 -Math.round(phase - mxUtils.mod(this.translate.y * this.scale - y0, phase)) + 'px';
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;
2563 …'<path d="' + d.join(' ') + '" fill="none" stroke="' + color + '" opacity="0.2" stroke-width="1"/>…
2564 …'<path d="M ' + tmp2 + ' 0 L 0 0 0 ' + tmp2 + '" fill="none" stroke="' + color + '" stroke-width="…
2570 // Adds panning for the grid with no page view and disabled scrollbars
2578 var canvas = this.view.canvas;
2585 var phase = this.gridSize * this.view.scale * this.view.gridSteps;
2586 …var position = -Math.round(phase - mxUtils.mod(this.view.translate.x * this.view.scale + dx, phase…
2587 -Math.round(phase - mxUtils.mod(this.view.translate.y * this.view.scale + dy, phase)) + 'px';
2595 var scale = this.view.scale;
2596 var tr = this.view.translate;
2600 var bounds2 = this.view.getBackgroundPageBounds();
2604 var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
2609 var horizontalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
2610 var verticalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
2611 var right = bounds2.x + width;
2633 [new mxPoint(Math.round(bounds2.x), Math.round(bounds2.y + (i + 1) * bounds.height)),
2635 [new mxPoint(Math.round(bounds2.x + (i + 1) * bounds.width), Math.round(bounds2.y)),
2636 new mxPoint(Math.round(bounds2.x + (i + 1) * bounds.width), Math.round(bottom))];
2649 pageBreak.init(this.view.backgroundPane);
2661 breaks.splice(count, breaks.length - count);
2724 var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
2725 var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
2735 var x0 = Math.floor(Math.min(0, x) / pw);
2737 var xe = Math.ceil(Math.max(1, x + w) / pw);
2740 var rows = xe - x0;
2741 var cols = ye - y0;
2743 var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
2755 if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
2758 this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
2759 this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
2833 var state = this.graph.view.getState(parent);