David Benson [draw.io] 3 éve
szülő
commit
08517ae82d

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+22-SEP-2021: 15.3.0
+
+- Fixes handling folder error while loading preview
+- Fixes svg/png with dark theme, background pages
+- Escapes HTML entities in file titles
+- Escaped innerHTML when mxResources is used in ODPicker
+- Fixes cellToClone is not defined
+- Adds electrical shapes
+- Updates pt-br translation. Thanks to Marcelo Filho.
+
 16-SEP-2021: 15.2.9
 
 - Fixes OneDrive inline picker script not loaded

+ 1 - 1
VERSION

@@ -1 +1 @@
-15.2.9
+15.3.0

+ 3 - 2
src/main/webapp/electron.js

@@ -17,7 +17,8 @@ const PDFDocument = require('pdf-lib').PDFDocument;
 const Store = require('electron-store');
 const store = new Store();
 const ProgressBar = require('electron-progressbar');
-require('@electron/remote/main').initialize();
+const remoteMain = require("@electron/remote/main")
+remoteMain.initialize()
 const disableUpdate = require('./disableUpdate').disableUpdate() || 
 						process.env.DRAWIO_DISABLE_UPDATE === 'true' || 
 						fs.existsSync('/.flatpak-info'); //This file indicates running in flatpak sandbox
@@ -76,7 +77,6 @@ function createWindow (opt = {})
 		webPreferences: {
 			// preload: path.resolve('./preload.js'),
 			nodeIntegration: true,
-			enableRemoteModule: true,
 			nodeIntegrationInWorker: true,
 			spellcheck: (os.platform() == "darwin" ? true : false),
 			contextIsolation: false,
@@ -85,6 +85,7 @@ function createWindow (opt = {})
 	}, opt)
 
 	let mainWindow = new BrowserWindow(options)
+	remoteMain.enable(mainWindow.webContents)
 	windowsRegistry.push(mainWindow)
 
 	if (__DEV__) 

BIN
src/main/webapp/images/sidebar-electrical.png


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 639 - 634
src/main/webapp/js/app.min.js


+ 8 - 6
src/main/webapp/js/diagramly/App.js

@@ -2356,17 +2356,19 @@ App.prototype.getThumbnail = function(width, fn)
 		if (this.pages != null && (darkTheme || this.currentPage != this.pages[0]))
 		{
 			var graphGetGlobalVariable = graph.getGlobalVariable;
-			graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());
+			graph = this.createTemporaryGraph((darkTheme) ?
+				graph.getDefaultStylesheet() : graph.getStylesheet());
+			graph.setBackgroundImage = this.editor.graph.setBackgroundImage;
 			var page = this.pages[0];
 
-			if (page.viewState != null && page.viewState != null)
+			if (this.currentPage == page)
 			{
-				bgImg = page.viewState.backgroundImage;
-				graph.backgroundImage = bgImg;
+				graph.setBackgroundImage(bgImg);
 			}
-			else if (this.currentPage == this.pages[0])
+			else if (page.viewState != null && page.viewState != null)
 			{
-				graph.backgroundImage = bgImg;
+				bgImg = page.viewState.backgroundImage;
+				graph.setBackgroundImage(bgImg);
 			}
 
 			// Avoids override of stylesheet in getSvg for dark mode

+ 2 - 2
src/main/webapp/js/diagramly/Devel.js

@@ -32,8 +32,8 @@ if (!mxIsElectron && location.protocol !== 'http:')
 			'; ';
 
 		var styleHashes = '\'sha256-JjkxVHHCCVO0nllPD6hU8bBYSlsikA8TM/o3fhr0bas=\' ' + // index.html
-			'\'sha256-Zgs8E4y6/1ZPUNwCar2OPticxk02Qlb+ky2zxyN772k=\' ' + // Minimal.js/Light
-			'\'sha256-NryHJ98pEOOFw9ZzA0Lltx+TKVhrJlQQzOqHjE0q8H8=\' ' + // Minimal.js/Dark
+			'\'sha256-qI/O8eJINxrLXr8JgAMXqbU/ndUPspeWtFXWmEwQ8S4=\' ' + // Minimal.js/Light
+			'\'sha256-I5oQtKP9i7Ik8gWyrTKbJbIw+sW0ab4RXhG1jqxcAfw=\' ' + // Minimal.js/Dark
 			'\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
 			'\'sha256-01chdey79TzZe4ihnvvUXXI5y8MklIcKH+vzDdQvsuU=\' ' + // Editor.js/mathJaxWebkitCss
 			'\'sha256-fGbXK7EYpvNRPca81zPnqJHi2y+34KSgAcZv8mhaSzI=\' ' + // MathJax.js

+ 2 - 2
src/main/webapp/js/diagramly/Dialogs.js

@@ -11917,7 +11917,7 @@ AspectDialog.prototype.init = function()
 	}
 };
 
-AspectDialog.prototype.createViewer = function(container, pageNode, layerId)
+AspectDialog.prototype.createViewer = function(container, pageNode, layerId, defaultBackground)
 {
 	mxEvent.disableContextMenu(container);
 	container.style.userSelect = 'none';
@@ -11938,7 +11938,7 @@ AspectDialog.prototype.createViewer = function(container, pageNode, layerId)
 		
 		if (bg == null || bg == '' || bg == mxConstants.NONE)
 		{
-			bg = '#ffffff';
+			bg = (defaultBackground != null) ? defaultBackground : '#ffffff';
 		}
 		
 		container.style.backgroundColor = bg;

+ 12 - 2
src/main/webapp/js/diagramly/Editor.js

@@ -6385,7 +6385,8 @@
 		{
 			temp = this.stylesheet;
 			tempBg = this.defaultPageBackgroundColor;
-			this.defaultPageBackgroundColor = this.defaultThemeName == 'darkTheme' ? '#ffffff' : '#2a2a2a';
+			this.defaultPageBackgroundColor = (this.defaultThemeName == 'darkTheme') ?
+				'#ffffff' : '#2a2a2a';
 			this.stylesheet = this.getDefaultStylesheet();
 			// LATER: Fix math export in dark mode by fetching text nodes before
 			// calling refresh and changing the font color in-place
@@ -6531,7 +6532,16 @@
 		}
 	};
 
-					
+	/**
+	 * Updates the SVG for the background image if it references another page.
+	 */
+	var graphRefresh = Graph.prototype.refresh;
+	Graph.prototype.refresh = function()
+	{
+		graphRefresh.apply(this, arguments);
+		this.refreshBackgroundImage();
+	};
+				 
 	/**
 	 * Updates the SVG for the background image if it references another page.
 	 */

+ 32 - 9
src/main/webapp/js/diagramly/EditorUi.js

@@ -1599,9 +1599,20 @@
 			if (darkTheme || (this.pages != null && this.currentPage != this.pages[0]))
 			{
 				var graphGetGlobalVariable = graph.getGlobalVariable;
-				graph = this.createTemporaryGraph(graph.getStylesheet());
+				graph = this.createTemporaryGraph(darkTheme ?
+						graph.getDefaultStylesheet() : graph.getStylesheet());
+				graph.setBackgroundImage = this.editor.graph.setBackgroundImage;
 				var page = this.pages[0];
-		
+
+				if (this.currentPage == page)
+				{
+					graph.setBackgroundImage(this.editor.graph.backgroundImage);	
+				}
+				else if (page.viewState != null && page.viewState != null)
+				{
+					graph.setBackgroundImage(page.viewState.backgroundImage);
+				}
+
 				graph.getGlobalVariable = function(name)
 				{
 					if (name == 'page')
@@ -6571,7 +6582,6 @@
 		return node;
 	};
 	
-		
 	/**
 	 * 
 	 */
@@ -6620,7 +6630,8 @@
 			// Exports PNG for given optional data
 			if (optionalData != null && optionalData.length > 0)
 			{
-				graph = this.createTemporaryGraph(this.editor.graph.getStylesheet());
+				graph = this.createTemporaryGraph((darkTheme) ?
+					graph.getDefaultStylesheet() : graph.getStylesheet());
 				document.body.appendChild(graph.container);
 				this.decodeNodeIntoGraph(this.editor.extractGraphModel(
 					mxUtils.parseXml(optionalData).documentElement, true), graph);
@@ -6629,9 +6640,20 @@
 			// Exports PNG for first page while other page is showing
 			else if (darkTheme || (this.pages != null && this.currentPage != this.pages[0]))
 			{
-				graph = this.createTemporaryGraph(graph.getStylesheet());
+				graph = this.createTemporaryGraph((darkTheme) ?
+					graph.getDefaultStylesheet() : graph.getStylesheet());
 				var graphGetGlobalVariable = graph.getGlobalVariable;
+				graph.setBackgroundImage = this.editor.graph.setBackgroundImage;
 				var page = this.pages[0];
+
+				if (this.currentPage == page)
+				{
+					graph.setBackgroundImage(this.editor.graph.backgroundImage);	
+				}
+				else if (page.viewState != null && page.viewState != null)
+				{
+					graph.setBackgroundImage(page.viewState.backgroundImage);
+				}
 		
 				graph.getGlobalVariable = function(name)
 				{
@@ -6685,7 +6707,8 @@
 	   			{
 	   				error(e);
 	   			}
-		   	}), null, null, scale, null, graph.shadowVisible, null, graph, border);
+		   	}), null, null, scale, null, graph.shadowVisible, null,
+				graph, border, null, null, null, 'diagram', null);
 		}
 		catch (e)
 		{
@@ -6713,8 +6736,8 @@
 
 		// Sets or disables alternate text for foreignObjects. Disabling is needed
 		// because PhantomJS seems to ignore switch statements and paint all text.
-		var svgRoot = graph.getSvg(bg, scale, border, null, null, ignoreSelection,
-			null, null, null, graph.shadowVisible || shadow, null, keepTheme);
+		var svgRoot = graph.getSvg(bg, scale, border, null, null, ignoreSelection, null,
+			null, null, graph.shadowVisible || shadow, null, keepTheme, 'diagram');
 		
 		if (graph.shadowVisible || shadow)
 		{
@@ -9157,7 +9180,7 @@
 		{
 			if (img != null && img.originalSrc != null)
 			{
-				img = ui.createImageForPageLink(img.originalSrc, ui.currentPage);
+				img = ui.createImageForPageLink(img.originalSrc, ui.currentPage, this);
 			}
 
 			graphSetBackgroundImage.apply(this, arguments);

+ 9 - 24
src/main/webapp/js/diagramly/GraphViewer.js

@@ -573,27 +573,8 @@ GraphViewer.prototype.getImageUrl = function(url)
  */
 GraphViewer.prototype.getImageForGraphModel = function(node)
 {
-	var graphGetGlobalVariable = this.graph.getGlobalVariable;
 	var graph = Graph.createOffscreenGraph(this.graph.getStylesheet());
-	// var index = this.getPageIndex((sourcePage != null) ?
-	// 	sourcePage : this.currentPage);
-
-	graph.getGlobalVariable = function(name)
-	{
-		// if (name == 'pagenumber')
-		// {
-		// 	return index + 1;
-		// }
-		// else if (name == 'page' && sourcePage != null)
-		// {
-		// 	return sourcePage.getName();
-		// }
-		// else
-		{
-			return graphGetGlobalVariable.apply(this, arguments);
-		}
-	};
-
+	graph.getGlobalVariable = this.graph.getGlobalVariable;
 	document.body.appendChild(graph.container);
 
 	var codec = new mxCodec(node.ownerDocument);
@@ -1993,14 +1974,18 @@ GraphViewer.prototype.showLocalLightbox = function()
 	
 	ui.createTemporaryGraph = function()
 	{
-		var graph = uiCreateTemporaryGraph.apply(this, arguments);
+		var newGraph = uiCreateTemporaryGraph.apply(this, arguments);
 		
-		graph.getImageFromBundles = function(key)
+		newGraph.getImageFromBundles = function(key)
 		{
 			return self.getImageUrl(key);
 		};
-		
-		return graph;
+
+		// newGraph.defaultPageBackgroundColor = graph.defaultPageBackgroundColor;
+		// newGraph.defaultPageBorderColor = graph.defaultPageBorderColor;
+		// newGraph.defaultThemeName = graph.defaultThemeName;
+			
+		return newGraph;
 	};
 	
 	if (this.graphConfig.move)

+ 2 - 4
src/main/webapp/js/diagramly/Minimal.js

@@ -472,8 +472,7 @@ EditorUi.initMinimalTheme = function()
 			'html td.mxWindowTitle div { top: 0px !important; }' +
 			// Fixes checkbox and radio size on iOS
 			((mxClient.IS_IOS) ? 'html input[type=checkbox], html input[type=radio] { height:12px; }' : '') +
-			((urlParams['sketch'] == '1') ? 'html .geStatusAlertOrange, html .geStatusAlert  { margin-top: -2px; }' +
-				'a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }' : '');
+			((urlParams['sketch'] == '1') ? 'a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }' : '');
 	};
 	
 	var styleElt = document.createElement('style')
@@ -1750,7 +1749,6 @@ EditorUi.initMinimalTheme = function()
 			}
 
 			graph.refresh();
-			graph.refreshBackgroundImage();
 			graph.view.validateBackground()
 		}));
 
@@ -1879,7 +1877,7 @@ EditorUi.initMinimalTheme = function()
 				}));
 			}
 			
-			elt = addMenu('diagram', null, Editor.drawLogoImage);
+			elt = addMenu('diagram', null, Editor.menuImage);
 			elt.style.boxShadow = 'none';
 			elt.style.opacity = '0.4';
 			elt.style.padding = '6px';

+ 11 - 3
src/main/webapp/js/diagramly/OneDriveClient.js

@@ -1496,11 +1496,19 @@ OneDriveClient.prototype.pickFile = function(fn)
 	{
 		this.authenticate(mxUtils.bind(this, function()
 		{
-			this.ui.showDialog(new BtnDialog(this.ui, this, mxResources.get('open'), mxUtils.bind(this, function()
+			if (this.inlinePicker)
 			{
 				this.ui.hideDialog();
-				odOpenDlg();							
-			})).container, 300, 140, true, true);
+				odOpenDlg();
+			}
+			else
+			{
+				this.ui.showDialog(new BtnDialog(this.ui, this, mxResources.get('open'), mxUtils.bind(this, function()
+				{
+					this.ui.hideDialog();
+					odOpenDlg();							
+				})).container, 300, 140, true, true);
+			}
 		}), errorFn);
 	}
 	else

+ 8 - 6
src/main/webapp/js/diagramly/Pages.js

@@ -325,7 +325,7 @@ EditorUi.prototype.getPageById = function(id)
 /**
  * Returns the background image for the given page link.
  */
-EditorUi.prototype.createImageForPageLink = function(src, sourcePage)
+EditorUi.prototype.createImageForPageLink = function(src, sourcePage, sourceGraph)
 {
 	var comma = src.indexOf(',');
 	var result = null;
@@ -336,7 +336,7 @@ EditorUi.prototype.createImageForPageLink = function(src, sourcePage)
 
 		if (page != null && page != sourcePage)
 		{
-			result = this.getImageForPage(page, sourcePage);
+			result = this.getImageForPage(page, sourcePage, sourceGraph);
 			result.originalSrc = src;
 		}
 	}
@@ -352,10 +352,11 @@ EditorUi.prototype.createImageForPageLink = function(src, sourcePage)
 /**
  * Returns true if the given string contains an mxfile.
  */
-EditorUi.prototype.getImageForPage = function(page, sourcePage)
+EditorUi.prototype.getImageForPage = function(page, sourcePage, sourceGraph)
 {
-	var graphGetGlobalVariable = this.editor.graph.getGlobalVariable;
-	var graph = this.createTemporaryGraph(this.editor.graph.getStylesheet());
+	sourceGraph = (sourceGraph != null) ? sourceGraph : this.editor.graph;
+	var graphGetGlobalVariable = sourceGraph.getGlobalVariable;
+	var graph = this.createTemporaryGraph(sourceGraph.getStylesheet());
 	var index = this.getPageIndex((sourcePage != null) ?
 		sourcePage : this.currentPage);
 
@@ -379,7 +380,8 @@ EditorUi.prototype.getImageForPage = function(page, sourcePage)
 
 	this.updatePageRoot(page);
 	graph.model.setRoot(page.root);
-	var svgRoot = graph.getSvg();
+	var svgRoot = graph.getSvg(null, null, null, null, null,
+		null, null, null, null, null, null, true);
 	var bounds = graph.getGraphBounds();
 	document.body.removeChild(graph.container);
 

+ 5 - 1
src/main/webapp/js/diagramly/sidebar/Sidebar-Electrical.js

@@ -292,8 +292,12 @@
 					75, 16, '', 'Limit Switch', null, null, this.getTagsForStencil(gnmeem, 'limit switch', dtmeem).join(' ')),
 			this.createVertexTemplateEntry(meem + 'circuit_breaker;', 
 					75, 20, '', 'Circuit Breaker', null, null, this.getTagsForStencil(gnmeem, 'circuit breaker', dtmeem).join(' ')),
+			this.createVertexTemplateEntry(meem + 'selector_switch_3_position;', 
+					75, 46, '', 'Selector Switch (3 positions)', null, null, this.getTagsForStencil(gnmeem, 'selector_switch', dtmeem).join(' ')),
 			this.createVertexTemplateEntry(meem + 'selector_switch;', 
-					75, 66, '', 'Selector Switch', null, null, this.getTagsForStencil(gnmeem, 'selector_switch', dtmeem).join(' ')),
+					75, 66, '', 'Selector Switch (4 positions)', null, null, this.getTagsForStencil(gnmeem, 'selector_switch', dtmeem).join(' ')),
+			this.createVertexTemplateEntry(meem + 'selector_switch_6_position;', 
+					75, 106, '', 'Selector Switch (6 positions)', null, null, this.getTagsForStencil(gnmeem, 'selector_switch', dtmeem).join(' ')),
 			this.createVertexTemplateEntry(meem + 'shorting_selector;', 
 					60, 66, '', 'Shorting Selector', null, null, this.getTagsForStencil(gnmeem, 'shorting selector', dtmeem).join(' ')),
 			this.createVertexTemplateEntry(meem + 'proximity_limit_switch;', 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
src/main/webapp/js/grapheditor/Editor.js


+ 1 - 1
src/main/webapp/js/grapheditor/Graph.js

@@ -2386,7 +2386,7 @@ Graph.prototype.init = function(container)
 		while (geo != null && geo.relative)
 		{
 			result = this.getModel().getParent(result);
-			geo = this.getCellGeometry(cellToClone);
+			geo = this.getCellGeometry(result);
 		}
 		
 		return result;

+ 27 - 27
src/main/webapp/js/onedrive/mxODPicker.js

@@ -56,22 +56,22 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 	var html = 
 			'<div class="odCatsList">' +
 				'<div class="odCatsListLbl">OneDrive</div>' + 
-				'<div id="odFiles" class="odCatListTitle odCatSelected">' + mxResources.get('files') + '</div>' +
-				'<div id="odRecent" class="odCatListTitle">' + mxResources.get('recent') + '</div>' +
-				'<div id="odShared" class="odCatListTitle">' + mxResources.get('shared') + '</div>' +
-				'<div id="odSharepoint" class="odCatListTitle">' + mxResources.get('sharepoint') + '</div>' +
+				'<div id="odFiles" class="odCatListTitle odCatSelected">' + mxUtils.htmlEntities(mxResources.get('files')) + '</div>' +
+				'<div id="odRecent" class="odCatListTitle">' + mxUtils.htmlEntities(mxResources.get('recent')) + '</div>' +
+				'<div id="odShared" class="odCatListTitle">' + mxUtils.htmlEntities(mxResources.get('shared')) + '</div>' +
+				'<div id="odSharepoint" class="odCatListTitle">' + mxUtils.htmlEntities(mxResources.get('sharepoint')) + '</div>' +
 			'</div>' +
 			'<div class="odFilesSec">' +
-				'<div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="' + mxResources.get('search') + '"></div>' +
+				'<div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="' + mxUtils.htmlEntities(mxResources.get('search')) + '"></div>' +
 				'<div class="odFilesBreadcrumb"></div>' +
 				'<div id="refreshOD" class="odRefreshButton">' +
-					'<img src="/images/update32.png" width="16" height="16" title="' + mxResources.get('refresh') + 'Refresh" border="0"/>' +
+					'<img src="/images/update32.png" width="16" height="16" title="' + mxUtils.htmlEntities(mxResources.get('refresh')) + 'Refresh" border="0"/>' +
 				'</div>' +
 				'<div class="odFilesList"></div>' +
 			'</div>' +
 			previewHtml +
-			(backFn? '<div id="odBackBtn" class="odLinkBtn">&lt; ' + mxResources.get('back') + '</div>' : '') +
-			(withSubmitBtn? '<button id="odSubmitBtn" class="odSubmitBtn">' + mxResources.get(foldersOnly? 'save' : 'open') + '</button>' : '');
+			(backFn? '<div id="odBackBtn" class="odLinkBtn">&lt; ' + mxUtils.htmlEntities(mxResources.get('back')) + '</div>' : '') +
+			(withSubmitBtn? '<button id="odSubmitBtn" class="odSubmitBtn">' + mxUtils.htmlEntities(mxResources.get(foldersOnly? 'save' : 'open')) + '</button>' : '');
 			
 	var css = 
 		'.odCatsList {' +
@@ -82,7 +82,6 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 		'	width:30%;' + 
 		'	border: 1px solid #CCCCCC;' + 
 		'	border-bottom:none;' + 
-		'	background-color: #FFFFFF;' + 
 		'	display: inline-block;' + 
 		'	overflow-x: hidden;' + 
 		'	overflow-y: auto;' + 
@@ -105,7 +104,6 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 		'	border: 1px solid #CCCCCC;' + 
 		'	border-left:none;' + 
 		'	border-bottom:none;' + 
-		'	background-color: #FFFFFF;' + 
 		'	display: inline-block;' + 
 		'	overflow: hidden;' + 
 		'}' + 
@@ -155,6 +153,7 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 		'	padding-right: 5px;' + 
 		'}' + 
 		'.odFileTitle {' + 
+		'	cursor: default;' + 
 		'	font-weight: normal;' + 
 		'	color: #666666 !important;' + 
 		'}' + 
@@ -166,10 +165,10 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 		'    border-spacing: 0;' + 
 		'}' + 
 		'.odOddRow {' + 
-		'	background-color: #eeeeee;' + 
+		(Editor.isDarkMode() ? '' : '	background-color: #eeeeee;') + 
 		'}' + 
 		'.odEvenRow {' + 
-		'	background-color: #FFFFFF;' + 
+		(Editor.isDarkMode() ? '' : '	background-color: #FFFFFF;') + 
 		'}' + 
 		'.odRowSelected {' + 
 		'	background-color: #cadfff;' + 
@@ -177,6 +176,7 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 		'.odCatListTitle {' + 
 		'	box-sizing: border-box;' + 
 		'	height: 17px;' + 
+		'	cursor: default;' + 
 		'	color: #666666;' + 
 		'	font-size: 14px;' + 
 		'	line-height: 17px;' + 
@@ -298,15 +298,17 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 						
 						if (isPng)
 						{
-							cnt = 'data:image/png;base64,' + Editor.base64Encode (cnt);
+							cnt = 'data:image/png;base64,' + Editor.base64Encode(cnt);
 							cnt = Editor.extractGraphModelFromPng(cnt);
 						}
 						
 						var doc = mxUtils.parseXml(cnt);
-	
-						if (editor.extractGraphModel(doc.documentElement) != null)
+						var node = Editor.extractGraphModel(doc.documentElement);
+
+						if (node != null)
 						{
-							success(doc);
+							success(node.ownerDocument);
+							
 							return;
 						}
 					}
@@ -357,6 +359,7 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 			return;	
 		}
 		
+		prevDiv.style.background = 'transparent';
 		prevDiv.innerHTML = '';
 		
 		function showRenderMsg(msg)
@@ -394,7 +397,9 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 				}
 
 				var diagrams = doc.getElementsByTagName('diagram');
-				curViewer = AspectDialog.prototype.createViewer(prevDiv, diagrams.length == 0? doc.documentElement : diagrams[0]);
+				curViewer = AspectDialog.prototype.createViewer(prevDiv,
+						diagrams.length == 0? doc.documentElement : diagrams[0],
+						null, 'transparent');
 
 				spinner.stop();
 			}, 
@@ -520,15 +525,6 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 				var tooltip = mxUtils.htmlEntities(item.description || title);
 				var titleLimit = Math.round(container.clientWidth * 0.7 / 10);
 						
-				if (title != null && title.length > titleLimit)
-				{
-					title = mxUtils.htmlEntities(title.substring(0, titleLimit)) + '&hellip;';
-				}
-				else
-				{
-					title = mxUtils.htmlEntities(title);
-				}
-				
 				if (isSharepointSites)
 				{
 					item.folder = true;
@@ -555,7 +551,8 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 				td = document.createElement('td');
 				var titleSpan = document.createElement('span');
 				titleSpan.className = "odFileTitle";
-				titleSpan.innerHTML = title;
+				titleSpan.innerHTML = (title != null && title.length > titleLimit)?
+						mxUtils.htmlEntities(title.substring(0, titleLimit)) + '&hellip;' : mxUtils.htmlEntities(title);
 				titleSpan.setAttribute('title', tooltip);
 				td.appendChild(titleSpan);
 				row.appendChild(td);
@@ -762,6 +759,9 @@ function mxODPicker(container, previewFn, getODFilesList, getODFileInfo, getRece
 	{
 		cats[i].addEventListener('click', function()
 		{
+			loadingPreviewFile = null;
+			selectedFile = null;
+
 			if (requestInProgress) return;
 			
 			setSelectedCat(this);

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/js/stencils.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1148 - 1145
src/main/webapp/js/viewer-static.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1148 - 1145
src/main/webapp/js/viewer.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/mxgraph/mxClient.js


+ 2 - 2
src/main/webapp/package.json

@@ -1,6 +1,6 @@
 {
   "name": "draw.io",
-  "version": "15.1.2",
+  "version": "15.2.7",
   "description": "diagrams.net desktop",
   "main": "electron.js",
   "scripts": {
@@ -23,7 +23,7 @@
   },
   "homepage": "https://github.com/jgraph/drawio",
   "dependencies": {
-    "@electron/remote": "^1.2.1",
+    "@electron/remote": "^2.0.1",
     "commander": "^8.1.0",
     "compression": "^1.7.4",
     "crc": "^3.8.0",

+ 141 - 141
src/main/webapp/resources/dia_pt-br.txt

@@ -2,12 +2,12 @@
 # https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE
 about=Sobre 
 aboutDrawio=Sobre draw.io
-accessDenied=Acesso Negado
-action=Action
-actualSize=Tamanho real 
+accessDenied=Acesso negado
+action=Ação
+actualSize=Tamanho real
 add=Adicionar
-addAccount=Add account
-addedFile=Adicionado {1}
+addAccount=Adicionar conta
+addedFile=Adicionou {1}
 addImages=Adicionar imagens
 addImageUrl=Adicionar URL da imagem
 addLayer=Adicionar camada
@@ -17,9 +17,9 @@ addToExistingDrawing=Adicionar ao desenho existente
 addWaypoint=Adicionar ponto de notificação
 adjustTo=Ajustar para
 advanced=Avançado
-align=Alinhar 
+align=Alinhar
 alignment=Alinhamento
-allChangesLost=Todas as alterações serão perdidas! 
+allChangesLost=Todas as alterações serão perdidas!
 allPages=Todas as páginas
 allProjects=Todos os projetos
 allSpaces=Todos os espaços
@@ -27,21 +27,21 @@ allTags=Todas as etiquetas
 anchor=Âncora
 android=Android
 angle=Ângulo
-arc=Arc
+arc=Arco
 areYouSure=Tem certeza?
 ensureDataSaved=Por favor, certifique-se de que seus dados estão salvos antes de fechar.
 allChangesSaved=Todas as alterações foram salvas
 allChangesSavedInDrive=Todas as alterações foram salvas no Drive
 allowPopups=Permita pop-ups para evitar esse diálogo.
-allowRelativeUrl=Allow relative URL
-alreadyConnected=Nodos já conectados 
+allowRelativeUrl=Permitir URL relativa
+alreadyConnected=Os nós já estão conectados
 apply=Aplicar
 archiMate21=ArchiMate 2.1
 arrange=Ordenar
 arrow=Seta
 arrows=Setas
 asNew=Como novo
-atlas=Atlas
+atlas=Azul
 author=Autor
 authorizationRequired=Autorização necessária
 authorizeThisAppIn=Autorize esse aplicativo em {1}:
@@ -49,205 +49,205 @@ authorize=Autorizar
 authorizing=Autorizando
 automatic=Automático
 autosave=Salvamento automático
-autosize=Auto dimensionar 
+autosize=Tamanho automático
 attachments=Anexos
 aws=AWS
 aws3d=AWS 3D
 azure=Azure
-back=Back
+back=Voltar
 background=Plano de fundo
-backgroundColor=Cor do plano de fundo
-backgroundImage=Imagem do plano de fundo
+backgroundColor=Cor de fundo
+backgroundImage=Imagem de fundo
 basic=Básico
 blankDrawing=Desenho em branco
 blankDiagram=Diagrama em branco
-block=Bloco 
+block=Bloco
 blockquote=Citação
 blog=Blog
-bold=Negrito 
+bold=Negrito
 bootstrap=Bootstrap
-border=Border
-borderColor=Cor da borda 
+border=Borda
+borderColor=Cor da borda
 borderWidth=Largura da borda
-bottom=Fundo
+bottom=Inferior
 bottomAlign=Alinhamento inferior
 bottomLeft=Inferior esquerdo
 bottomRight=Inferior direito
 bpmn=BPMN
-bringForward=Bring Forward
-browser=Navegador
+bringForward=Avançar
+browser=Navegador de internet
 bulletedList=Lista com marcadores
 business=Negócio
 busy=Operação em andamento
 cabinets=Gabinete
-cancel=Cancelar 
-center=Centro 
-cannotLoad=Falha na tentativa de carregar. Por favor, tente novamente mais tarde.
-cannotLogin=Falha na tentativa de login. Por favor, tente novamente mais tarde.
+cancel=Cancelar
+center=Centro
+cannotLoad=Erro ao carregar. Por favor, tente novamente mais tarde.
+cannotLogin=Erro ao fazer login. Por favor, tente novamente mais tarde.
 cannotOpenFile=Não é possível abrir o arquivo
 change=Modificar
 changeOrientation=Modificar orientação
 changeUser=Modificar usuário
-changeStorage=Change storage
+changeStorage=Modificar local de armazenamento
 changesNotSaved=As alterações não foram salvas
-classDiagram=Class Diagram
+classDiagram=Diagrama de classes
 userJoined={1} se juntou
 userLeft={1} saiu
-chatWindowTitle=Bate-papo
+chatWindowTitle=Conversa
 chooseAnOption=Escolha uma opção
 chromeApp=Aplicativo Chrome
-collaborativeEditingNotice=Important Notice for Collaborative Editing
-compare=Compare
-compressed=Comprimido
-commitMessage=Cometer mensagem
-configLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!
-configLinkConfirm=Click OK to configure and restart draw.io.
-container=Container
+collaborativeEditingNotice=Aviso importante sobre a edição colaborativa
+compare=Comparar
+compressed=Otimizado
+commitMessage=Mensagem de envio
+configLinkWarn=Este link configura o draw.io. Clique em OK apenas se você confiar em quem o enviou!
+configLinkConfirm=Clique em OK para configurar e recarregar o draw.io.
+container=Cabeçalhos
 csv=CSV
-dark=Dark
-diagramXmlDesc=XML File
-diagramHtmlDesc=HTML File
-diagramPngDesc=Editable Bitmap Image
-diagramSvgDesc=Editable Vector Image
-didYouMeanToExportToPdf=Did you mean to export to PDF?
-draftFound=Foi encontrado um rascunho para '{1}'. Carregue no editor ou descarte para continuar.
-draftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.
-selectDraft=Select a draft to continue editing:
-dragAndDropNotSupported=Arraste e solte não suportados para imagens. Gostaria de importar?
-dropboxCharsNotAllowed=Os seguintes caracteres não são permitidos: \/:?*"|
-check=Validar
-checksum=Checksum
+dark=Escuro
+diagramXmlDesc=Arquivo XML
+diagramHtmlDesc=Arquivo HTML
+diagramPngDesc=Imagem de bitmap editável
+diagramSvgDesc=Imagem vetorial editável
+didYouMeanToExportToPdf=Você quer exportar como PDF?
+draftFound=Foi encontrado um rascunho para '{1}'. Carregue-o no editor ou descarte-o para continuar.
+draftRevisionMismatch=Existe uma versão diferente deste diagrama em um rascunho compartilhado. Continue a editar o diagrama no rascunho para garantir que você está editando a versão mais recente.
+selectDraft=Selecione um rascunho para continuar editando:
+dragAndDropNotSupported=Não é possível arrastar e soltar imagens aqui. Gostaria de importar essas imagens?
+dropboxCharsNotAllowed=Os seguintes caracteres não são permitidos: \ / : ? * " |
+check=Verificar
+checksum=Soma de verificação
 circle=Círculo
 cisco=Cisco
 classic=Clássica
 clearDefaultStyle=Limpar estilo padrão
 clearWaypoints=Limpar pontos de notificação
 clipart=Clipart
-close=Fechar 
-closingFile=Closing file
+close=Fechar
+closingFile=Fechando o arquivo
 collaborator=Colaborador
 collaborators=Colaboradores
 collapse=Ocultar
-collapseExpand=Ocultar/Expandir
-collapse-expand=Clique para ocultar/expandir\Clique nShift para mover vizinhos\Clique nAlt para proteger o tamanho do grupo
+collapseExpand=Ocultar/Mostrar
+collapse-expand=Clique para ocultar/mostrar\nClique com a tecla Shift pressionada para mover nos eixos\nClique com a tecla Alt para proteger o tamanho do grupo
 collapsible=Minimizável
 comic=Cômico
 comment=Comentário
 commentsNotes=Comentários/Notas
-compress=Compress
-configuration=Configuration
+compress=Comprimir
+configuration=Configurações
 connect=Conectar
 connecting=Conectando
-connectWithDrive=Conecte-se com Google Drive
-connection=Conexão 
+connectWithDrive=Conectar-se ao Google Drive
+connection=Conexão
 connectionArrows=Setas de conexão
 connectionPoints=Pontos de conexão
 constrainProportions=Restringir proporções
-containsValidationErrors=Contém erros de validação 
+containsValidationErrors=Contém erros de validação
 copiedToClipboard=Copiado para a área de transferência
 copy=Copiar
 copyConnect=Copiar ao conectar
-copyCreated=A copy of the file was created.
-copyData=Copy Data
+copyCreated=Uma cópia do arquivo foi criada.
+copyData=Copiar dados
 copyOf=Cópia de {1}
 copyOfDrawing=Cópia de desenho
-copySize=Copy Size
+copySize=Copiar tamanho
 copyStyle=Copiar estilo
 create=Criar
 createNewDiagram=Criar novo diagrama
 createRevision=Criar revisão
 createShape=Criar forma
-crop=Recortar
+crop=Página única
 curved=Curvado
 custom=Personalizado
 current=Atual
-currentPage=Current page
-cut=Cortar 
-dashed=Tracejado 
+currentPage=Página atual
+cut=Cortar
+dashed=Tracejado
 decideLater=Decidir mais tarde
 default=Padrão
 delete=Excluir
 deleteColumn=Excluir coluna
-deleteLibrary401=Permissões insuficientes para excluir esta biblioteca
-deleteLibrary404=Biblioteca selecionada não foi encontrada
+deleteLibrary401=Você não tem permissão para excluir essa biblioteca
+deleteLibrary404=A biblioteca selecionada não foi encontrada
 deleteLibrary500=Erro ao excluir a biblioteca
-deleteLibraryConfirm=Você está prester a excluir esta biblioteca. Você tem certeza?
+deleteLibraryConfirm=Você está prestes a excluir essa biblioteca. Tem certeza?
 deleteRow=Excluir linha
 description=Descrição
-device=Dispositivo
+device=Aparelho
 diagram=Diagrama
 diagramContent=Conteúdo do diagrama
-diagramLocked=Diagrama foi travado para prevenir futura perda de dados.
-diagramLockedBySince=The diagram is locked by {1} since {2} ago
+diagramLocked=A edição do diagrama foi travada para prevenir futura perda de dados.
+diagramLockedBySince=A edição do diagrama foi travada por {1} há {2}
 diagramName=Nome do diagrama
-diagramIsPublic=Diagrama é público
-diagramIsNotPublic=Diagrama não é público
+diagramIsPublic=Esse diagrama é público
+diagramIsNotPublic=Esse diagrama não é público
 diamond=Diamante
 diamondThin=Diamante (fino)
-didYouKnow=Você sabia...
-direction=Direção 
+didYouKnow=Você sabia?
+direction=Girar
 discard=Descartar
-discardChangesAndReconnect=Descartar mudanças e reconectar
+discardChangesAndReconnect=Descartar mudanças e recarregar
 googleDriveMissingClickHere=Google Drive ausente? Clique aqui!
 discardChanges=Descartar mudanças
 disconnected=Desconectado
 distribute=Distribuir
 done=Concluído
-doNotShowAgain=Do not show again
+doNotShowAgain=Não mostrar de novo
 dotted=Pontilhado
-doubleClickOrientation=Clique duas vezes para mudar de orientação 
+doubleClickOrientation=Clique duas vezes para girar
 doubleClickTooltip=Clique duas vezes para inserir texto
 doubleClickChangeProperty=Clique duas vezes para alterar o nome da propriedade
 download=Baixar
-downloadDesktop=Get Desktop
+downloadDesktop=Baixar para Desktop
 downloadAs=Baixar como
 clickHereToSave=Clique aqui para salvar.
-dpi=DPI
+dpi=Pontos/polegada
 draftDiscarded=Rascunho descartado
 draftSaved=Rascunho salvo
-dragElementsHere=Arraste elementos aqui
-dragImagesHere=Arraste imagens ou URLs aqui
-dragUrlsHere=Arraste URLs aqui
+dragElementsHere=Arraste elementos para cá
+dragImagesHere=Arraste imagens ou URLs para cá
+dragUrlsHere=Arraste URLs para cá
 draw.io=draw.io
 drawing=Desenho{1}
-drawingEmpty=Desenho está vazio
-drawingTooLarge=O desenho é muito grande 
+drawingEmpty=O desenho está vazio
+drawingTooLarge=O desenho é muito grande
 drawioForWork=Draw.io para GSuite
 dropbox=Dropbox
 duplicate=Duplicar
-duplicateIt=Duplicar {1]
-divider=Dividir
+duplicateIt=Duplicar {1}
+divider=Divisor
 dx=Dx
 dy=Dy
-east=Leste
-edit=Editar 
+east=Direita
+edit=Editar
 editData=Editar dados
 editDiagram=Editar diagrama
 editGeometry=Editar geometria
 editImage=Editar imagem
-editImageUrl=Editar URL de Imagem
+editImageUrl=Editar URL de imagem
 editLink=Editar ligação
 editShape=Editar formato
 editStyle=Editar estilo
 editText=Editar texto
-editTooltip=Editar tooltip
+editTooltip=Editar dica de contexto
 glass=Vidro
-googleImages=Google Images
+googleImages=Google Imagens
 imageSearch=Procurar imagem
 eip=EIP
-embed=Inserir
-embedImages=Inserir imagens
-mainEmbedNotice=Colar isto na página
+embed=Incorporar
+embedImages=Incorporar imagens
+mainEmbedNotice=Colar esse conteúdo na página
 electrical=Elétrico
-ellipse=Ellipse
-embedNotice=Adicionar isto, uma vez, no fim da página
+ellipse=Elipse
+embedNotice=Cola esse conteúdo uma vez no fim da página
 enterGroup=Inserir grupo
 enterName=Inserir nome
-enterPropertyName=Inserir nome de propriedade
-enterValue=Inserir valor 
-entityRelation=Relação de entidade
-entityRelationshipDiagram=Entity Relationship Diagram
-error=Erro 
+enterPropertyName=Inserir nome da propriedade
+enterValue=Inserir valor
+entityRelation=Relação da entidade
+entityRelationshipDiagram=Diagrama Entidade-Relacionamento
+error=Erro
 errorDeletingFile=Erro ao excluir o aquivo
 errorLoadingFile=Erro ao carregar o arquivo
 errorRenamingFile=Erro ao renomear o arquivo
@@ -360,9 +360,9 @@ googleDrive=Google Drive
 googleGadget=Google Gadget
 googlePlus=Google+
 googleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:
-googleSlides=Google Slides
+googleSlides=Google Apresentações
 googleSites=Google Sites
-googleSheets=Google Sheets
+googleSheets=Google Planilhas
 gradient=Gradiente
 gradientColor=Cor
 grid=Grade
@@ -372,8 +372,8 @@ group=Agrupar
 guides=Guias
 hateApp=Eu odeio draw.io
 heading=Cabeçalho
-height=Altura 
-help=Ajuda 
+height=Altura
+help=Ajuda
 helpTranslate=Nos ajude a traduzir este aplicativo
 hide=Ocultar 
 hideIt=Ocultar {1}
@@ -413,7 +413,7 @@ insertRowBefore=Inserir linha acima
 insertRowAfter=Inserir linha abaixo
 insertText=Inserir texto
 inserting=Inserindo
-installApp=Install App
+installApp=Instalar o aplicativo
 invalidFilename=Nomes de diagramas não podem conter os seguintes caracteres: \ / | : ; { } < > & + ? = "
 invalidLicenseSeeThisPage=Sua licença é inválida, por favor veja <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.
 invalidInput=Invalid input
@@ -467,7 +467,7 @@ loggedOut=Desconectado
 logIn=Conectar
 loveIt=Eu amo {1}
 lucidchart=Lucidchart
-maps=Maps
+maps=Mapas
 mathematicalTypesetting=Sistema tipográfico matemático
 makeCopy=Fazer uma cópia
 manual=Manual
@@ -478,7 +478,7 @@ microsoftExcel=Microsoft Excel
 microsoftPowerPoint=Microsoft PowerPoint
 microsoftWord=Microsoft Word
 middle=Meio
-minimal=Minimal
+minimal=Mínimo
 misc=Miscelânea
 mockups=Protótipos
 modificationDate=Data da alteração
@@ -494,7 +494,7 @@ name=Nome
 navigation=Navegação
 network=Network
 networking=Rede
-new=Novo 
+new=Novo
 newLibrary=Nova biblioteca
 nextPage=Próxima página
 no=Não
@@ -515,7 +515,7 @@ noRevisions=Nenhuma revisão
 noSearchResults=Nenhum resultado de busca encontrado
 noPageContentOrNotSaved=Nenhuma âncora encontrada nesta página ou ainda não foi salvo
 normal=Normal
-north=Norte 
+north=Topo
 notADiagramFile=Não é um arquivo de diagrama
 notALibraryFile=Não é um arquivo de biblioteca
 notAvailable=Não está disponível
@@ -559,7 +559,7 @@ pageWithNumber=Página-{1}
 pages=Páginas
 pageView=Visualização da Página 
 pageSetup=Configuração da Página
-pageScale=Escala da Página
+pageScale=Escala da página
 pan=Panorama
 panTooltip=Espaço+Arrastar para deslocar
 paperSize=Formato do Papel 
@@ -586,16 +586,16 @@ portrait=Retrato
 position=Posição 
 posterPrint=Imprimir Cartaz 
 preferences=Preferências
-preview=Pré-visualizar 
+preview=Visualizar
 previousPage=Página anterior
-print=Imprimir 
+print=Imprimir
 printAllPages=Imprimir todas as páginas
 procEng=Engenharia de Processos
 project=Projeto
 priority=Prioridade
 properties=Propriedades
-publish=Publicar
-quickStart=Introdução rápida vídeo
+publish=Publicar na Web
+quickStart=Vídeo de introdução rápida
 rack=Gabinete
 radial=Radial
 radialTree=Árvore radial
@@ -603,7 +603,7 @@ readOnly=Somente leitura
 reconnecting=Reconetando
 recentlyUpdated=Recentemente atualizado
 recentlyViewed=Recentemente visto
-rectangle=Rectangle
+rectangle=Retângulo
 redirectToNewApp=Esse arquivo foi criado ou modificado em uma versão mais recente deste aplicativo. Você será redirecionado agora.
 realtimeTimeout=Parece que você fez algumas mudanças enquanto estava offline. Infelizmente, essas mudanças não podem ser salvas.
 redo=Refazer 
@@ -625,7 +625,7 @@ replace=Substituir
 replaceIt={1} já existe. Você deseja substituí-lo? 
 replaceExistingDrawing=Substituir desenho já existente
 required=obrigatório
-reset=Reinicializar
+reset=Recarregar
 resetView=Redefinir visualização
 resize=Redimensionar
 resizeLargeImages=Do you want to resize large images to make the application run faster?
@@ -672,7 +672,7 @@ selectFont=Selecionar Fonte
 selectNone=Não selecionar nada
 selectTemplate=Select Template
 selectVertices=Selecionar vértices 
-sendBackward=Send Backward
+sendBackward=Recuar
 sendMessage=Enviar
 sendYourFeedback=Enviar seu feedback
 serviceUnavailableOrBlocked=Serviço indisponível ou bloqueado
@@ -682,7 +682,7 @@ setAsDefaultStyle=Configurar como Estilo Padrão
 shadow=Sombra
 shape=Formato
 shapes=Formatos
-share=Partilhar
+share=Compartilhar
 shareLink=Link para edição partilhada
 sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Quadrado
@@ -698,7 +698,7 @@ size=Tamanho 
 sketch=Sketch
 solid=Sólido
 sourceSpacing=Espaçamento entre fontes
-south=Sul
+south=Inferior
 software=Software
 space=Espaço
 spacing=Espaçamento 
@@ -719,7 +719,7 @@ swimlaneDiagram=Swimlane Diagram
 sysml=SysML
 tags=Etiquetas
 table=Tabela
-tables=Tables
+tables=Tabelas
 takeOver=Take Over
 targetSpacing=Espaçamento do objeto
 template=Modelo
@@ -735,13 +735,13 @@ toBack=Para trás 
 toFront=Para a frente 
 tooLargeUseDownload=Too large, use download instead.
 toolbar=Toolbar
-tooltips=Dicas da ferramenta
+tooltips=Dicas de contexto
 top=Topo
 topAlign=Alinhar superior
-topLeft=Superior Esquerdo
-topRight=Superior Direito
+topLeft=Superior esquerdo
+topRight=Superior direito
 transparent=Transparente
-transparentBackground=Plano de Fundo Transparente
+transparentBackground=Plano de fundo transparente
 trello=Trello
 tryAgain=Tentar novamente
 tryOpeningViaThisPage=Tente abrir através desta página
@@ -766,7 +766,7 @@ updatingSelection=Atualizando seleção. Por favor, aguarde... 
 upload=Carregar
 url=URL
 useOffline=Use Offline
-useRootFolder=Use root folder?
+useRootFolder=Usar a pasta principal?
 userManual=Manual do Usuário
 vertical=Vertical 
 verticalFlow=Fluxo vertical
@@ -777,14 +777,14 @@ viewUrl=Link para visualização: {1}
 voiceAssistant=Assistente de Voz (beta)
 warning=Alerta
 waypoints=Pontos de notificação
-west=Oeste
+west=Esquerda
 width=Largura 
 wiki=Wiki
 wordWrap=Quebra de linha
 writingDirection=Direção de escrita
 yes=Sim
 yourEmailAddress=Seu endereço de e-mail
-zoom=Zoom 
+zoom=Zoom
 zoomIn=Mais zoom 
 zoomOut=Menos zoom 
 basic=Básico
@@ -803,11 +803,11 @@ venndiagrams=Diagramas de Venn
 webEmailOrOther=Web, e-mail ou outro endereço de internet
 webLink=Link de Web
 wireframes=Wireframes
-property=Property
-value=Value
+property=Propriedade
+value=Valor
 showMore=Show More
 showLess=Show Less
-myDiagrams=My Diagrams
+myDiagrams=Meus diagramas
 allDiagrams=All Diagrams
 recentlyUsed=Recently used
 listView=List view
@@ -819,7 +819,7 @@ officeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pa
 officeSelectSingleDiag=Please select a single draw.io diagram only without other contents.
 officeSelectDiag=Please select a draw.io diagram.
 officeCannotFindDiagram=Cannot find a draw.io diagram in the selection
-noDiagrams=No diagrams found
+noDiagrams=Nenhum diagrama encontrado
 authFailed=Authentication failed
 officeFailedAuthMsg=Unable to successfully authenticate user or authorize application.
 convertingDiagramFailed=Converting diagram failed
@@ -854,12 +854,12 @@ lastSaved=Last saved {1} ago
 resolve=Resolve
 reopen=Re-open
 showResolved=Show Resolved
-reply=Reply
+reply=Responder
 objectNotFound=Object not found
 reOpened=Re-opened
 markedAsResolved=Marked as resolved
 noCommentsFound=No comments found
-comments=Comments
+comments=Comentários
 timeAgo={1} ago
 confluenceCloud=Confluence Cloud
 libraries=Libraries
@@ -894,10 +894,10 @@ drawPrev=draw.io preview
 drawDiag=draw.io diagram
 invalidCallFnNotFound=Invalid Call: {1} not found
 invalidCallErrOccured=Invalid Call: An error occurred, {1}
-anonymous=Anonymous
+anonymous=Anônimo
 confGotoPage=Go to containing page
 showComments=Show Comments
-confError=Error: {1}
+confError=Erro: {1}
 gliffyImport=Gliffy Import
 gliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.
 gliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.
@@ -980,11 +980,11 @@ pickODFile=Pick OneDrive File
 pickGDriveFile=Pick Google Drive File
 pickDeviceFile=Pick Device File
 vsdNoConfig="vsdurl" is not configured
-ruler=Ruler
-units=Units
+ruler=Régua
+units=Unidades
 points=Points
 inches=Inches
-millimeters=Millimeters
+millimeters=Milímetros
 confEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.
 confDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session's modifications.
 macroNotFound=Macro Not Found
@@ -1065,7 +1065,7 @@ curDiagram=Current Diagram
 recentDiags=Recent Diagrams
 csvImport=CSV Import
 chooseFile=Choose a file...
-choose=Choose
+choose=Escolher
 gdriveFname=Google Drive filename
 widthOfViewer=Width of the viewer (px)
 heightOfViewer=Height of the viewer (px)

+ 7 - 7
src/main/webapp/resources/dia_pt.txt

@@ -80,7 +80,7 @@ bulletedList=Lista com marcas
 business=Negócio
 busy=Operação em curso
 cabinets=Armários
-cancel=Cancelar 
+cancel=Cancelar
 center=Centrar
 cannotLoad=Ocorreu um erro ao tentar carregar. Por favor, tente novamente.
 cannotLogin=Ocorreu um erro ao iniciar sessão. Por favor, tente novamente.
@@ -215,7 +215,7 @@ drawingTooLarge=O desenho é demasiado grande 
 drawioForWork=Draw.io para GSuite
 dropbox=Dropbox
 duplicate=Duplicar
-duplicateIt=Duplicar {1]
+duplicateIt=Duplicar {1}
 divider=Separador
 dx=Dx
 dy=Dy
@@ -372,8 +372,8 @@ group=Agrupar
 guides=Guias
 hateApp=Eu odeio draw.io
 heading=Cabeçalho
-height=Altura 
-help=Ajuda 
+height=Altura
+help=Ajuda
 helpTranslate=Ajude-nos a traduzir esta aplicação
 hide=Ocultar 
 hideIt=Ocultar {1}
@@ -586,9 +586,9 @@ portrait=Vertical
 position=Posição 
 posterPrint=Imprimir cartaz 
 preferences=Preferências
-preview=Pré-visualizar 
+preview=Pré-visualizar
 previousPage=Página anterior
-print=Imprimir 
+print=Imprimir
 printAllPages=Imprimir todas as páginas
 procEng=Engenharia de Processos
 project=Projecto
@@ -784,7 +784,7 @@ wordWrap=Quebra de linha
 writingDirection=Direção da escrita
 yes=Sim
 yourEmailAddress=O teu endereço electrónico
-zoom=Zoom 
+zoom=Zoom
 zoomIn=Mais zoom 
 zoomOut=Menos zoom 
 basic=Básico

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/service-worker.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/service-worker.js.map


+ 95 - 0
src/main/webapp/stencils/electrical/electro-mechanical.xml

@@ -1375,6 +1375,101 @@
         <fillstroke/>
     </foreground>
 </shape>
+<shape aspect="variable" h="46" name="Selector Switch 3 position" strokewidth="inherit" w="75.006">
+    <connections>
+        <constraint name="W" perimeter="0" x="0" y="0.5"/>
+        <constraint name="NE" perimeter="0" x="1" y="0.065"/>
+        <constraint name="E" perimeter="0" x="1" y="0.5"/>
+        <constraint name="SE" perimeter="0" x="1" y="0.935"/>
+    </connections>
+    <foreground>
+        <path>
+            <move x="0" y="23.003"/>
+            <line x="15" y="23.003"/>
+            <move x="55.4" y="23.003"/>
+            <line x="75.006" y="23.003"/>
+            <move x="51" y="3"/>
+            <line x="75" y="3"/>
+            <move x="51" y="43"/>
+            <line x="75" y="43"/>
+            <move x="18.592" y="22.68"/>
+            <line x="46.465" y="3.877"/>
+        </path>
+        <stroke/>
+        <ellipse h="6" w="6" x="50.005" y="20.003"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="45" y="0"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="45" y="40"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="15" y="20.003"/>
+        <fillstroke/>
+        <fillcolor color="#000000"/>
+        <path>
+            <move x="43.268" y="9.436"/>
+            <line x="39.746" y="4.984"/>
+            <line x="46.416" y="3.95"/>
+            <close/>
+        </path>
+        <fill/>
+    </foreground>
+</shape>
+<shape aspect="variable" h="105.993" name="Selector Switch 6 position" strokewidth="inherit" w="74.853">
+    <connections>
+        <constraint name="W" perimeter="0" x="0" y="0.5"/>
+        <constraint name="NE" perimeter="0" x="1" y="0.025"/>
+        <constraint name="E1" perimeter="0" x="1" y="0.22"/>
+        <constraint name="E2" perimeter="0" x="1" y="0.405"/>
+        <constraint name="E3" perimeter="0" x="1" y="0.595"/>
+        <constraint name="E4" perimeter="0" x="1" y="0.78"/>
+        <constraint name="SE" perimeter="0" x="1" y="0.97"/>
+    </connections>
+    <background>
+        <path>
+            <move x="0" y="53.003"/>
+            <line x="15" y="53.003"/>
+            <move x="60" y="63.003"/>
+            <line x="74.853" y="63.003"/>
+            <move x="60" y="43.003"/>
+            <line x="74.853" y="43.003"/>
+            <move x="51" y="23.003"/>
+            <line x="74.853" y="23.003"/>
+            <move x="28.993" y="2.999"/>
+            <line x="74.852" y="2.999"/>
+            <move x="28.992" y="102.993"/>
+            <line x="74.853" y="102.993"/>
+            <move x="51" y="83.003"/>
+            <line x="74.853" y="83.003"/>
+            <move x="18" y="53.003"/>
+            <line x="47" y="24.003"/>
+        </path>
+    </background>
+    <foreground>
+        <stroke/>
+        <ellipse h="6" w="6" x="54" y="60.003"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="54" y="40.003"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="45" y="20.003"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="22.993" y="0"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="22.992" y="99.993"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="45" y="80.003"/>
+        <fillstroke/>
+        <ellipse h="6" w="6" x="15" y="50.003"/>
+        <fillstroke/>
+        <fillcolor color="#000000"/>
+        <path>
+            <move x="47" y="24.003"/>
+            <line x="45" y="30.003"/>
+            <line x="40.667" y="26.336"/>
+            <close/>
+        </path>
+        <fill/>
+    </foreground>
+</shape>
 <shape aspect="variable" h="66" name="Shorting Selector" strokewidth="inherit" w="60">
     <connections>
         <constraint name="W" perimeter="0" x="0" y="0.5"/>