Bladeren bron

11.1.4 release

David Benson [draw.io] 6 jaren geleden
bovenliggende
commit
69dbeef5a6

+ 16 - 0
ChangeLog

@@ -1,3 +1,19 @@
+08-AUG-2019: 11.1.4
+
+- Fixes grid NPE in export dialog
+
+08-AUG-2019: 11.1.3
+
+- Adds export option to include grid
+- Fixes last Gitlab project used in group
+- Adds custom Gitlab parameters
+- Fixes compressed XML export option
+
+05-AUG-2019: 11.1.2
+
+- Fixes encoding of embedded PNG data
+- Ads custom Gitlab URL option
+
 02-AUG-2019: 11.1.1
 
 - Forces in-place electron users to upgrade page

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.1.1
+11.1.4

+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 08/02/2019 03:00 PM
+# 08/08/2019 04:41 PM
 
 app.html
 index.html?offline=1

+ 54 - 2
src/main/webapp/export3.html

@@ -48,8 +48,24 @@
 			{
 				extras = JSON.parse(data.extras);
 			} 
-			catch(e){}
+			catch(e)
+			{
+				try 
+				{
+					extras = JSON.parse(decodeURIComponent(data.extras));
+				}
+				catch(e){}
+			}
 
+			var gridColor = null;
+			
+			if (extras != null && extras.grid != null)
+			{
+				graph.gridSize = extras.grid.size;
+				graph.view.gridSteps = extras.grid.steps;
+				gridColor = extras.grid.color;
+			}
+			
 			//PNG+XML format
 			if (data.xml.substring(0, 5) == 'iVBOR' || (extras != null && extras.isPng))
 			{
@@ -239,6 +255,41 @@
 				}
 			};
 
+			function renderGrid()
+			{
+				if (gridColor == null) return;
+					
+				var view = graph.view;
+				var gridImage = btoa(unescape(encodeURIComponent(view.createSvgGrid(gridColor))));
+				gridImage = 'url(' + 'data:image/svg+xml;base64,' + gridImage + ')';
+                var phase = graph.gridSize * view.gridSteps * view.scale;
+                
+				var x0 = 0;
+				var y0 = 0;
+				
+				if (view.backgroundPageShape != null)
+				{
+					var bds = view.getBackgroundPageBounds();
+					
+					x0 = 1 + bds.x;
+					y0 = 1 + bds.y;
+				}
+				
+				// Computes the offset to maintain origin for grid
+				var position = -Math.round(phase - mxUtils.mod(view.translate.x * view.scale - x0, phase)) + 'px ' +
+					-Math.round(phase - mxUtils.mod(view.translate.y * view.scale - y0, phase)) + 'px';
+				
+				var pages = document.querySelectorAll('[id^=mxPage]');
+				
+				var cssTxt = 'margin: 0;padding: 0;background-image: ' + gridImage + ';background-position: ' + position;
+				document.body.style.cssText = cssTxt;
+
+				for (var i = 0; i < pages.length; i++)
+				{
+					pages[i].style.cssText = cssTxt;
+				}
+			};
+			
 			function renderPage()
 			{
 				// Enables math typesetting
@@ -287,7 +338,7 @@
 				{
 					document.body.style.backgroundColor = bg;
 				}
-
+				
 				//handle layers
 				if (extras != null && extras.layers != null)
 				{
@@ -586,6 +637,7 @@
 				renderPage();
 			}
 			
+			renderGrid();
 			// Includes images in SVG and HTML labels
 			waitForImages('image', 'xlink:href');
 			waitForImages('img', 'src');

+ 1 - 1
src/main/webapp/index.html

@@ -232,7 +232,7 @@
 		.geFooterContainer>div#geFooter>img {
 			opacity:0.5;
 			border:1px solid transparent;
-			cusor:pointer;
+			cursor:pointer;
 			margin-top:3px;
 			margin-right:6px;
 			position:absolute;

File diff suppressed because it is too large
+ 675 - 673
src/main/webapp/js/app.min.js


+ 4 - 3
src/main/webapp/js/diagramly/App.js

@@ -1,7 +1,8 @@
 /**
- * Copyright (c) 2006-2018, JGraph Ltd
- * Copyright (c) 2006-2018, Gaudenz Alder
+ * Copyright (c) 2006-2019, JGraph Ltd
+ * Copyright (c) 2006-2019, draw.io AG
  */
+
 /**
  * Constructs a new point for the optional x and y coordinates. If no
  * coordinates are given, then the default values for <x> and <y> are used.
@@ -2302,7 +2303,7 @@ App.prototype.appIconClicked = function(evt)
 			}
 			else
 			{
-				this.openLink('https://gitlab.com/');
+				this.openLink(DRAWIO_GITLAB_URL);
 			}
 		}
 		else if (mode == App.MODE_DEVICE)

+ 5 - 4
src/main/webapp/js/diagramly/Dialogs.js

@@ -1,7 +1,8 @@
 /**
- * Copyright (c) 2006-2018, JGraph Ltd
- * Copyright (c) 2006-2018, Gaudenz Alder
+ * Copyright (c) 2006-2019, JGraph Ltd
+ * Copyright (c) 2006-2019, draw.io AG
  */
+
 var StorageDialog = function(editorUi, fn, rowLimit)
 {
 	rowLimit = (rowLimit != null) ? rowLimit : 2;
@@ -822,7 +823,7 @@ var SplashDialog = function(editorUi)
 			addLogout(function()
 			{
 				editorUi.gitLab.logout();
-				editorUi.openLink('https://gitlab.com/users/sign_out');
+				editorUi.openLink(DRAWIO_GITLAB_URL + '/users/sign_out');
 			});
 		}
 		else if (editorUi.mode == App.MODE_TRELLO && editorUi.trello != null)
@@ -5040,7 +5041,7 @@ var LinkDialog = function(editorUi, initialValue, btnLabel, fn, showPages)
 					var ref = tokens[2];
 					var path = tokens.slice(3, tokens.length).join('/');
 
-					linkInput.value = 'https://gitlab.com/' + org + '/' +
+					linkInput.value = DRAWIO_GITLAB_URL + '/' + org + '/' +
 						repo + '/blob/' + ref + '/' + path;
 					linkInput.focus();
 				}

+ 80 - 27
src/main/webapp/js/diagramly/EditorUi.js

@@ -1615,7 +1615,7 @@
 	 * @param {number} dx X-coordinate of the translation.
 	 * @param {number} dy Y-coordinate of the translation.
 	 */
-	EditorUi.prototype.downloadFile = function(format, nonCompressed, addShadow, ignoreSelection, currentPage, pageVisible, transparent, scale, border)
+	EditorUi.prototype.downloadFile = function(format, nonCompressed, addShadow, ignoreSelection, currentPage, pageVisible, transparent, scale, border, grid)
 	{
 		try
 		{
@@ -1716,7 +1716,7 @@
 							this.editor.graph.pageVisible = pageVisible;
 						}
 						
-						var req = this.createDownloadRequest(newTitle, format, ignoreSelection, base64, transparent, currentPage, scale, border);
+						var req = this.createDownloadRequest(newTitle, format, ignoreSelection, base64, transparent, currentPage, scale, border, grid);
 						this.editor.graph.pageVisible = prev;
 						
 						return req;
@@ -1740,7 +1740,7 @@
 	 * @param {number} dx X-coordinate of the translation.
 	 * @param {number} dy Y-coordinate of the translation.
 	 */
-	EditorUi.prototype.createDownloadRequest = function(filename, format, ignoreSelection, base64, transparent, currentPage, scale, border)
+	EditorUi.prototype.createDownloadRequest = function(filename, format, ignoreSelection, base64, transparent, currentPage, scale, border, grid)
 	{
 		var bounds = this.editor.graph.getGraphBounds();
 		
@@ -1798,6 +1798,13 @@
 			'&base64=' + base64 + '&embedXml=' + embed + '&xml=' +
 			encodeURIComponent(data) + ((filename != null) ?
 			'&filename=' + encodeURIComponent(filename) : '') +
+			(grid? '&extras=' + encodeURIComponent(JSON.stringify({
+				grid: {
+					size: this.editor.graph.gridSize,
+					steps: this.editor.graph.view.gridSteps,
+					color: this.editor.graph.view.gridColor
+				}
+			})) : '') +
 			(scale != null? '&scale=' + scale : '') +
 			(border != null? '&border=' + border : ''));
 	};
@@ -3832,7 +3839,7 @@
    	    
    	    if (xml != null)
    	    {
-   	    	data = this.writeGraphModelToPng(data, 'tEXt', 'mxfile', xml);
+   	    	data = this.writeGraphModelToPng(data, 'tEXt', 'mxfile', encodeURIComponent(xml));
    	    }
    	    
    	    return data;
@@ -5357,6 +5364,14 @@
 			height += 26;
 		}
 		
+		var grid = null;
+		
+		if (format == 'png' || format == 'jpeg')
+		{
+			grid = this.addCheckbox(div, mxResources.get('grid'), false, this.isOffline() || !this.canvasSupported, false, true); 
+			height += 26;
+		}
+		
 		var include = this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'), defaultInclude, null, null, format != 'jpeg');
 		var hasPages = this.pages != null && this.pages.length > 1;
 		var allPages = this.addCheckbox(div, (hasPages) ? mxResources.get('allPages') : '', hasPages, !hasPages, null, format != 'jpeg');
@@ -5423,7 +5438,7 @@
 			
 			callback(zoomInput.value, transparent.checked, !selection.checked, shadow.checked,
 				include.checked, cb5.checked, borderInput.value, cb6.checked, !allPages.checked,
-				linkSelect.value);
+				linkSelect.value, (grid != null? grid.checked : null));
 		}), null, btnLabel, helpLink);
 		this.showDialog(dlg.container, 340, height, true, true, null, null, null, null, true);
 		zoomInput.focus();
@@ -5908,7 +5923,7 @@
 		   			
 		   	   	    var data = canvas.toDataURL('image/png');
 		   	   	    data = this.writeGraphModelToPng(data,
-		   	   	    	'tEXt', 'mxfile', diagramData);
+		   	   	    	'tEXt', 'mxfile', encodeURIComponent(diagramData));
 	   	   	   		success(data.substring(data.lastIndexOf(',') + 1));
 	
 					// Removes temporary graph from DOM
@@ -6001,7 +6016,7 @@
 	/**
 	 *
 	 */
-	EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, currentPage, format)
+	EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, currentPage, format, grid)
 	{
 		format = (format != null) ? format : 'png';
 		
@@ -6045,7 +6060,7 @@
 			   		this.spinner.stop();
 			   		this.handleError(e);
 			   	}), null, ignoreSelection, scale || 1, transparentBackground,
-			   		addShadow, null, null, border, noCrop);
+			   		addShadow, null, null, border, noCrop, grid);
 			}
 			catch (e)
 			{
@@ -6178,7 +6193,7 @@
 	 *
 	 */
 	EditorUi.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight,
-		ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop)
+		ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid)
 	{
 		try
 		{
@@ -6205,7 +6220,7 @@
 				bg = '#ffffff';
 			}
 			
-			this.convertImages(graph.getSvg(bg, null, null, noCrop, null, ignoreSelection, null, null, null, addShadow),
+			this.convertImages(graph.getSvg(null, null, null, noCrop, null, ignoreSelection, null, null, null, addShadow),
 				mxUtils.bind(this, function(svgRoot)
 			{
 				var img = new Image();
@@ -6239,22 +6254,60 @@
 							ctx.fill();
 				   		}
 	
-				   		ctx.scale(scale, scale);
-				   		
-				   		// Workaround for broken data URI images in Safari on first export
-				   		if (mxClient.IS_SF)
-				   		{			   		
-							window.setTimeout(function()
+					    ctx.scale(scale, scale);
+
+					    function drawImage()
+					    {
+					    	// Workaround for broken data URI images in Safari on first export
+					   		if (mxClient.IS_SF)
+					   		{			   		
+								window.setTimeout(function()
+								{
+									ctx.drawImage(img, border / scale, border / scale);
+									callback(canvas);
+								}, 0);
+					   		}
+					   		else
+					   		{
+					   			ctx.drawImage(img, border / scale, border / scale);
+					   			callback(canvas);
+					   		}
+					    };
+					    
+					    if (grid)
+					    {
+						    var view = graph.view;
+							var gridImage = btoa(unescape(encodeURIComponent(view.createSvgGrid(view.gridColor))));
+							gridImage = 'data:image/svg+xml;base64,' + gridImage;
+			                var phase = graph.gridSize * view.gridSteps * scale;
+			                
+			                var b = graph.getGraphBounds();
+							var x0 = b.x * scale;
+							var y0 = b.y * scale;
+							
+							var background = new Image();
+							background.src = gridImage;
+	
+							background.onload = function()
 							{
-								ctx.drawImage(img, border / scale, border / scale);
-								callback(canvas);
-							}, 0);
-				   		}
-				   		else
-				   		{
-				   			ctx.drawImage(img, border / scale, border / scale);
-				   			callback(canvas);
-				   		}
+								var x = -Math.round(phase - mxUtils.mod(view.translate.x * scale - x0, phase));
+								var y = -Math.round(phase - mxUtils.mod(view.translate.y * scale - y0, phase));
+	
+								for (var i = x; i < w; i += phase)
+								{
+									for (var j = y; j < h; j += phase)
+									{
+										ctx.drawImage(background, i / scale, j / scale);	
+									}
+								}
+							
+								drawImage();
+							};
+					    }
+					    else
+				    	{
+					    	drawImage();
+				    	}
 			   		}
 			   		catch (e)
 			   		{
@@ -10510,8 +10563,8 @@
 								
 						   	    if (data.format == 'xmlpng')
 						   	    {
-						   	    	uri = this.writeGraphModelToPng(uri, 'zTXt', 'mxGraphModel',
-						   	    		atob(Graph.compress(xml)));	
+						   	    	uri = this.writeGraphModelToPng(uri, 'tEXt', 'mxfile',
+						   	    		encodeURIComponent(xml));
 						   	    }
 						   	    	
 								// Removes temporary graph from DOM

+ 20 - 19
src/main/webapp/js/diagramly/GitLabClient.js

@@ -1,6 +1,6 @@
 /**
- * Copyright (c) 2006-2017, JGraph Ltd
- * Copyright (c) 2006-2017, Gaudenz Alder
+ * Copyright (c) 2006-2019, JGraph Ltd
+ * Copyright (c) 2006-2019, draw.io AG
  */
 GitLabClient = function(editorUi)
 {
@@ -13,7 +13,7 @@ mxUtils.extend(GitLabClient, GitHubClient);
 /**
  * Gitlab Client ID, see https://gitlab.com/oauth/applications/135239
  */
-GitLabClient.prototype.clientId = '5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44';
+GitLabClient.prototype.clientId = DRAWIO_GITLAB_ID;
 
 /**
  * OAuth scope.
@@ -23,7 +23,7 @@ GitLabClient.prototype.scope = 'api%20read_repository%20write_repository';
 /**
  * Base URL for API calls.
  */
-GitLabClient.prototype.baseUrl = 'https://gitlab.com/api/v4';
+GitLabClient.prototype.baseUrl = DRAWIO_GITLAB_URL + '/api/v4';
 
 /**
  * Authorizes the client, gets the userId and calls <open>.
@@ -40,7 +40,7 @@ GitLabClient.prototype.authenticate = function(success, error)
 			{
 				var state = '123';
 				var redirectUri = encodeURIComponent(window.location.origin + '/gitlab.html');
-				var win = window.open('https://gitlab.com/oauth/authorize?client_id=' +
+				var win = window.open(DRAWIO_GITLAB_URL + '/oauth/authorize?client_id=' +
 					this.clientId + '&scope=' + this.scope + '&redirect_uri=' + redirectUri +
 					'&response_type=token&state=' + state, 'gitlabauth');
 				
@@ -353,7 +353,7 @@ GitLabClient.prototype.getFile = function(path, success, error, asLibrary, check
  */
 GitLabClient.prototype.createGitLabFile = function(org, repo, ref, data, asLibrary, refPos)
 {
-	var gitLabUrl = 'https://gitlab.com/';
+	var gitLabUrl = DRAWIO_GITLAB_URL + '/';
 	var htmlUrl = gitLabUrl + org + '/' + repo + '/blob/' + ref + '/' + data.file_path;
 	var downloadUrl = gitLabUrl + org + '/' + repo + '/raw/' + ref + '/' + data.file_path + '?inline=false';
 	var fileName = data.file_name;
@@ -430,7 +430,7 @@ GitLabClient.prototype.insertFile = function(filename, data, success, error, asL
 				// Does not insert file here as there is another writeFile implicit via fileCreated
 				if (!asLibrary)
 				{
-					var gitLabUrl = 'https://gitlab.com/';
+					var gitLabUrl = DRAWIO_GITLAB_URL + '/';
 					var htmlUrl = gitLabUrl + org + '/' + repo + '/blob/' + ref + '/' + path;
 					var downloadUrl = gitLabUrl + org + '/' + repo + '/raw/' + ref + '/' + path + '?inline=false';
 					
@@ -1094,19 +1094,20 @@ GitLabClient.prototype.showGitLabDialog = function(showFiles, fn)
 								temp.style.backgroundColor = (gray) ? '#eeeeee' : '';
 								gray = !gray;
 								
-								var project = projects[j];
-								
-								temp.appendChild(createLink(project.name_with_namespace, mxUtils.bind(this, function()
+								(mxUtils.bind(this, function(project)
 								{
-									org = group.full_path;
-									repo = project.path;
-									ref = project.default_branch || 'master';
-									path = '';
-			
-									selectFile();
-								})));
-
-								div.appendChild(temp);
+									temp.appendChild(createLink(project.name_with_namespace, mxUtils.bind(this, function()
+									{
+										org = group.full_path;
+										repo = project.path;
+										ref = project.default_branch || 'master';
+										path = '';
+				
+										selectFile();
+									})));
+	
+									div.appendChild(temp);
+								}))(projects[j]);
 							}
 						})));
 					}

+ 29 - 0
src/main/webapp/js/diagramly/Init.js

@@ -1,3 +1,8 @@
+/**
+ * Copyright (c) 2006-2019, JGraph Ltd
+ * Copyright (c) 2006-2019, draw.io AG
+ */
+
 // urlParams is null when used for embedding
 window.urlParams = window.urlParams || {};
 
@@ -16,6 +21,8 @@ window.PLANT_URL = window.PLANT_URL || 'https://exp-plant.draw.io/plantuml4';
 window.DRAW_MATH_URL = window.DRAW_MATH_URL || 'https://www.draw.io/math';
 window.VSD_CONVERT_URL = window.VSD_CONVERT_URL || "https://convert.draw.io/VsdConverter/api/converter";
 window.EMF_CONVERT_URL = window.EMF_CONVERT_URL || "https://convert.draw.io/emf2png/convertEMF";
+window.DRAWIO_GITLAB_URL = window.DRAWIO_GITLAB_URL || "https://gitlab.com";
+window.DRAWIO_GITLAB_ID = window.DRAWIO_GITLAB_ID || '5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44';
 window.SAVE_URL = window.SAVE_URL || 'save';
 window.OPEN_URL = window.OPEN_URL || 'open';
 window.PROXY_URL = window.PROXY_URL || 'proxy';
@@ -257,6 +264,28 @@ function setCurrentXml(data, filename)
 		EXPORT_URL = ex;
 	}
 
+	// Customizes gitlab URL
+	var glUrl = urlParams['gitlab'];
+
+	if (glUrl != null)
+	{
+		glUrl = decodeURIComponent(glUrl);
+		
+		if (glUrl.substring(0, 7) != 'http://' &&  glUrl.substring(0, 8) != 'https://')
+		{
+			glUrl = 'http://' + glUrl;
+		}
+		
+		DRAWIO_GITLAB_URL = glUrl;
+	}
+	
+	var glId = urlParams['gitlab-id'];
+
+	if (glId != null)
+	{
+		DRAWIO_GITLAB_ID = glId;
+	}
+
 	// URL for logging
 	window.DRAWIO_LOG_URL = window.DRAWIO_LOG_URL || '';
 

+ 13 - 13
src/main/webapp/js/diagramly/Menus.js

@@ -170,10 +170,8 @@
 			
 			var selection = editorUi.addCheckbox(div, mxResources.get('selectionOnly'),
 				false, graph.isSelectionEmpty());
-			var compressed = editorUi.addCheckbox(div, mxResources.get('compressed'),
-				!noPages, noPages);
-			var pages = editorUi.addCheckbox(div, mxResources.get('allPages'),
-				true, noPages);
+			var compressed = editorUi.addCheckbox(div, mxResources.get('compressed'), true);
+			var pages = editorUi.addCheckbox(div, mxResources.get('allPages'), !noPages, noPages);
 			pages.style.marginBottom = '16px';
 			
 			mxEvent.addListener(selection, 'change', function()
@@ -190,11 +188,11 @@
 			
 			var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
 			{
-				editorUi.downloadFile('xml', noPages || !compressed.checked, null,
+				editorUi.downloadFile('xml', !compressed.checked, null,
 					!selection.checked, noPages || !pages.checked);
 			}), null, mxResources.get('export'));
 			
-			editorUi.showDialog(dlg.container, 300, 176, true, true);
+			editorUi.showDialog(dlg.container, 300, 180, true, true);
 		}));
 		
 		editorUi.actions.put('exportUrl', new Action(mxResources.get('url') + '...', function()
@@ -268,7 +266,7 @@
 					}
 				};
 				
-				var dlgH = 146;
+				var dlgH = 172;
 				
 				if (editorUi.pdfPageExport && !noPages)
 				{
@@ -276,11 +274,12 @@
 					var currentPage = editorUi.addRadiobox(div, 'pages', mxResources.get('currentPage', null, 'Current Page'), false);
 					var selection = editorUi.addRadiobox(div, 'pages', mxResources.get('selectionOnly'), false, graph.isSelectionEmpty());
 					var crop = editorUi.addCheckbox(div, mxResources.get('crop'), false, true);
+					var grid = editorUi.addCheckbox(div, mxResources.get('grid'), false, false);
 					
 					mxEvent.addListener(allPages, 'change', cropEnableFn);
 					mxEvent.addListener(currentPage, 'change', cropEnableFn);
 					mxEvent.addListener(selection, 'change', cropEnableFn);
-					dlgH = 205;
+					dlgH = 231;
 				}
 				else
 				{
@@ -289,6 +288,7 @@
 					var crop = editorUi.addCheckbox(div, mxResources.get('crop'),
 							!graph.pageVisible || !editorUi.pdfPageExport,
 							!editorUi.pdfPageExport);
+					var grid = editorUi.addCheckbox(div, mxResources.get('grid'), false, false);
 					
 					// Crop is only enabled if selection only is selected
 					if (!editorUi.pdfPageExport)
@@ -299,7 +299,7 @@
 				
 				var dlg = new CustomDialog(editorUi, div, mxUtils.bind(this, function()
 				{
-					editorUi.downloadFile('pdf', null, null, !selection.checked, noPages? true : !allPages.checked, !crop.checked);
+					editorUi.downloadFile('pdf', null, null, !selection.checked, noPages? true : !allPages.checked, !crop.checked, null, null, null, grid.checked);
 				}), null, mxResources.get('export'));
 				editorUi.showDialog(dlg.container, 300, dlgH, true, true);
 			}
@@ -555,14 +555,14 @@
 				editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
 					'https://support.draw.io/display/DO/Exporting+Files',
 					mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection,
-						addShadow, editable, embedImages, border, cropImage, currentPage)
+						addShadow, editable, embedImages, border, cropImage, currentPage, dummy, grid)
 					{
 						var val = parseInt(scale);
 						
 						if (!isNaN(val) && val > 0)
 						{
 						   	editorUi.exportImage(val / 100, transparentBackground, ignoreSelection,
-						   		addShadow, editable, border, !cropImage, currentPage);
+						   		addShadow, editable, border, !cropImage, currentPage, null, grid);
 						}
 					}), true, true, 'png');
 			}
@@ -582,14 +582,14 @@
 				editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
 					'https://support.draw.io/display/DO/Exporting+Files',
 					mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection,
-						addShadow, editable, embedImages, border, cropImage, currentPage)
+						addShadow, editable, embedImages, border, cropImage, currentPage, dummy, grid)
 					{
 						var val = parseInt(scale);
 						
 						if (!isNaN(val) && val > 0)
 						{
 							editorUi.exportImage(val / 100, false, ignoreSelection,
-							   	addShadow, false, border, !cropImage, false, 'jpeg');
+							   	addShadow, false, border, !cropImage, false, 'jpeg', grid);
 						}
 					}), true, false, 'jpeg');
 			}

File diff suppressed because it is too large
+ 611 - 609
src/main/webapp/js/viewer.min.js


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

@@ -1,6 +1,6 @@
 {
   "name": "draw.io",
-  "version": "11.1.1",
+  "version": "10.8.0",
   "description": "draw.io desktop",
   "main": "electron.js",
   "scripts": {
@@ -34,4 +34,4 @@
   "devDependencies": {
     "electron": "^6.0.0"
   }
-}
+}

+ 29 - 29
src/main/webapp/resources/dia_nl.txt

@@ -52,7 +52,7 @@ attachments=Bijlagen
 aws=AWS
 aws3d=AWS 3D
 azure=Azure
-back=Back
+back=Terug
 background=Achtergrond
 backgroundColor=Achtergrondkleur
 backgroundImage=Achtergrondafbeelding
@@ -130,7 +130,7 @@ containsValidationErrors=Bevat validatiefouten
 copiedToClipboard=Gekopieerd naar klembord
 copy=Kopiëren
 copyConnect=Kopiëren bij verbinding
-copyCreated=A copy of the file was created.
+copyCreated=Een kopie van het bestand is aangemaakt.
 copyOf=Kopie van {1}
 copyOfDrawing=Kopie van tekening
 copySize=Afmetingen kopiëren
@@ -272,9 +272,9 @@ fileNotFoundOrDenied=Bestand niet gevonden. Het bestaat niet of u heeft geen rec
 fileNotLoaded=Bestand niet geladen
 fileNotSaved=Bestand niet opgeslagen
 fileOpenLocation=Hoe wilt u dit/deze bestand(en) openen?
-filetypeHtml=.html causes file to save as HTML with redirect to cloud URL
-filetypePng=.png causes file to save as PNG with embedded data
-filetypeSvg=.svg causes file to save as SVG with embedded data
+filetypeHtml=.html slaat het bestand op als HTML met verwijzing naar een URL
+filetypePng=.png slaat het bestand op als PNG met ingebedde data
+filetypeSvg=.svg slaat het bestand op als SVG met ingebedde data
 fileWillBeSavedInAppFolder={1} zal in de appfolder worden opgeslagen.
 fill=Vullen
 fillColor=Vulkleur
@@ -315,10 +315,10 @@ formatHtmlEmbedded=HTML
 formatSvgEmbedded=SVG (met XML)
 formatVsdx=VSDX
 formatVssx=VSSX
-formatXmlPlain=XML (eenvoudig)
+formatXmlPlain=XML (basis)
 formatXml=XML
 forum=Discussie-/Helpforums
-freehand=Freehand
+freehand=Vrije hand
 fromTemplate=Van sjabloon
 fromTemplateUrl=Van sjabloon-URL
 fromText=Van tekst
@@ -332,12 +332,12 @@ github=GitHub
 gitlab=GitLab
 gliffy=Gliffy
 global=Globaal
-googleDocs=Google Docs
+googleDocs=Google Documenten
 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
+googleSharingNotAvailable=Delen is alleen beschikbaar via Google Drive. Klik hieronder op Openen, Meer acties, Delen:
+googleSlides=Google Dia's
 googleSites=Google Sites
 gradient=Gradiënt
 gradientColor=Kleur
@@ -470,7 +470,7 @@ new=Nieuw
 newLibrary=Nieuwe bibliotheek
 nextPage=Volgende pagina
 no=Nee
-noPickFolder=No, pick folder
+noPickFolder=Nee, kies een map
 noAttachments=Geen bijlagen gevonden
 noColor=Geen kleur
 noFiles=Geen bestanden
@@ -666,11 +666,11 @@ space=Ruimte
 spacing=Afstand
 specialLink=Speciale Link
 standard=Standaard
-startDrawing=Start drawing
-stopDrawing=Stop drawing
+startDrawing=Start tekenen
+stopDrawing=Stop met tekenen
 starting=Opstarten
 straight=Recht
-strikethrough=Strikethrough
+strikethrough=Doorgehaald
 strokeColor=Lijnkleur
 style=Stijl
 subscript=Subscript
@@ -694,7 +694,7 @@ title=Titel
 to=tot
 toBack=Naar achteren
 toFront=Naar voren
-toolbar=Toolbar
+toolbar=Gereedschapsbalk
 tooltips=Tooltips
 top=Boven
 topAlign=Boven uitlijnen
@@ -732,7 +732,7 @@ vertical=Verticaal
 verticalFlow=Verticale stroom
 verticalTree=Verticale boom
 view=Bekijken
-viewerSettings=Viewer Settings
+viewerSettings=Weergave-instellingen
 viewUrl=Link om te bekijken: {1}
 voiceAssistant=Spraakassistent (beta)
 warning=Waarschuwing
@@ -763,19 +763,19 @@ venndiagrams=Venn Diagrammen
 webEmailOrOther=Web, e-mail of een ander internetadres
 webLink=Weblink
 wireframes=Draadmodellen
-property=Property
-value=Value
-showMore=Show More
-showLess=Show Less
-myDiagrams=My Diagrams
-allDiagrams=All Diagrams
-recentlyUsed=Recently used
-listView=List view
-gridView=Grid view
-resultsFor=Results for '{1}'
-oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # %  * : < > ? / \ { | }
-oneDriveInvalidDeviceName=The specified device name is invalid
-officeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.
+property=Eigenschap
+value=Waarde
+showMore=Meer tonen
+showLess=Minder tonen
+myDiagrams=Mijn Diagrammen
+allDiagrams=Alle Diagrammen
+recentlyUsed=Onlangs gebruikt
+listView=Lijstweergave
+gridView=Rasterweergave
+resultsFor=Resultaten voor '{1}'
+oneDriveCharsNotAllowed=De volgende tekens zijn niet toegestaan: ~ "#% *: <>? / \ {|}
+oneDriveInvalidDeviceName=De opgegeven apparaatnaam is ongeldig
+officeNotLoggedOD=U bent niet aangemeld bij OneDrive. Open het Draw.io taakvenster en log eerst in.
 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