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

2  * Copyright (c) 2006-2016, JGraph Ltd
3 * Copyright (c) 2006-2016, Gaudenz Alder
6 * Constructs a new point for the optional x and y coordinates. If no
7 * coordinates are given, then the default values for <x> and <y> are used.
10 * @param {number} x X-coordinate of the point.
11 * @param {number} y Y-coordinate of the point.
41 * Holds the view state for the page.
130 * Action to change the current root in a view.
134 * Constructs a change of the current root in the given view.
183 // mxUtils.setPrefixedStyle(graph.view.canvas.style, 'transition', null);
184 // mxUtils.setPrefixedStyle(graph.view.canvas.style, 'transform',
185 // (curIndex > prevIndex) ? 'translate(-50%,0)' : 'translate(50%,0)');
188 graph.view.clear(page.root, true);
196 // Switches the root cell and sets the view state
197 graph.model.prefix = Editor.guid() + '-';
207 graph.view.validate();
212 // mxUtils.setPrefixedStyle(graph.view.canvas.style, 'transition', 'transform 0.2s');
213 // mxUtils.setPrefixedStyle(graph.view.canvas.style, 'transform', 'translate(0,0)');
244 * Changes the current root of the view.
248 // Fires event to setting view state from realtime
392 bounds.width, bounds.height, bounds.x, bounds.y);
420 var graphViewValidateBackground = graph.view.validateBackground;
422 graph.view.validateBackground = mxUtils.bind(this, function()
444 graphViewValidateBackground.apply(graph.view, arguments);
476 … graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + p.viewState.scrollLeft;
477 graph.container.scrollTop = graph.view.translate.y * graph.view.scale + p.viewState.scrollTop;
513 // Adds a graph model listener to update the view
559 graph.view.revalidate();
563 graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + viewState.scrollLeft;
564 graph.container.scrollTop = graph.view.translate.y * graph.view.scale + viewState.scrollTop;
692 currentRoot: this.view.currentRoot,
694 //gridColor: this.view.gridColor,
708 scale: this.view.scale,
709 scrollLeft: this.container.scrollLeft - this.view.translate.x * this.view.scale,
710 scrollTop: this.container.scrollTop - this.view.translate.y * this.view.scale,
711 translate: this.view.translate.clone(),
731 //this.view.gridColor = state.gridColor;
741 this.view.currentRoot = state.currentRoot;
752 // Removing old fonts is important for real-time synchronization
774 this.view.scale = state.scale;
778 this.view.scale = 1;
782 if (this.view.currentRoot != null &&
783 !this.model.contains(this.view.currentRoot))
785 this.view.currentRoot = null;
797 this.view.translate = state.translate;
802 this.view.currentRoot = null;
803 this.view.scale = 1;
838 if (urlParams['ext-fonts'] != '1')
859 style.appendChild(document.createTextNode('@font-face {\n' +
860 '\tfont-family: "'+ fontName +'";\n' +
1010 this.selectPage(this.pages[mxUtils.mod(tmp - 1, this.pages.length)]);
1119 if (tmp == this.pages.length - 1)
1121 tmp--;
1174 // Clones the current page and takes a snapshot of the graph model and view state
1263 wrapper.style.display = 'inline-block';
1276 …var tabWidth = Math.min(140, Math.max(20, (this.tabContainer.clientWidth - btnWidth) / this.pages.…
1358 // Not chromeless and not read-only file
1365 if (wrapper.clientWidth > this.tabContainer.clientWidth - btnWidth)
1389 var dx = Math.max(0, this.tabContainer.clientWidth - ((this.editor.chromeless) ? 86 : 116));
1396 wrapper.scrollLeft -= Math.max(20, dx - 20);
1398 …mxUtils.setOpacity(temp2, (wrapper.scrollLeft < wrapper.scrollWidth - wrapper.clientWidth) ? 100 :…
1403 …mxUtils.setOpacity(temp2, (wrapper.scrollLeft < wrapper.scrollWidth - wrapper.clientWidth) ? 100 :…
1407 wrapper.scrollLeft += Math.max(20, dx - 20);
1409 …mxUtils.setOpacity(temp2, (wrapper.scrollLeft < wrapper.scrollWidth - wrapper.clientWidth) ? 100 :…
1431 tab.style.display = 'inline-block';
1433 tab.style.boxSizing = 'border-box';
1437 tab.style.marginLeft = '-1px';
1493 var tab = this.createControlTab(3, '<div class="geSprite geSprite-dots"></div>', hoverEnabled);
1501 div.style.display = 'inline-block';
1581 var x = mxEvent.getClientX(evt);
1583 menu.popup(x, y, null, evt);
1599 var tab = this.createControlTab(4, '<div class="geSprite geSprite-plus"></div>');
1610 div.style.display = 'inline-block';
1642 * @param {number} dx X-coordinate of the translation.
1643 * @param {number} dy Y-coordinate of the translation.
1696 var x = mxEvent.getClientX(evt);
1698 menu.popup(x, y, null, evt);
1720 'state', 'clibs', 'ui', 'viewbox', 'hide-pages']);
1721 search += ((search.length == 0) ? '?' : '&') + 'page-id=' + page.getId();
1779 params.push('hide-pages=1');
1786 var t = graph.view.translate;
1787 var s = graph.view.scale;
1790 bounds.x = bounds.x / s - t.x;
1791 bounds.y = bounds.y / s - t.y;
1793 …params.push('viewbox=' + encodeURIComponent(JSON.stringify({x: Math.round(bounds.x), y: Math.round… property
1964 // be re-inserted into the model. Since the encoded version