浏览代码

6.8.17 release

Gaudenz Alder 8 年之前
父节点
当前提交
26d9518e05
共有 75 个文件被更改,包括 2035 次插入1837 次删除
  1. 6 0
      ChangeLog
  2. 1 1
      VERSION
  3. 1 1
      war/cache.manifest
  4. 二进制
      war/images/img-hi-res.png
  5. 二进制
      war/images/img-lo-res.png
  6. 389 392
      war/js/app.min.js
  7. 318 314
      war/js/atlas-viewer.min.js
  8. 350 353
      war/js/atlas.min.js
  9. 52 6
      war/js/diagramly/Dialogs.js
  10. 10 0
      war/js/diagramly/Editor.js
  11. 347 251
      war/js/diagramly/EditorUi.js
  12. 29 11
      war/js/diagramly/Menus.js
  13. 10 1
      war/js/diagramly/Settings.js
  14. 2 103
      war/js/diagramly/sidebar/Sidebar-Gmdl.js
  15. 1 1
      war/js/embed-static.min.js
  16. 15 4
      war/js/mxgraph/Dialogs.js
  17. 7 0
      war/js/mxgraph/Format.js
  18. 11 0
      war/js/mxgraph/Sidebar.js
  19. 1 1
      war/js/reader.min.js
  20. 318 314
      war/js/viewer.min.js
  21. 82 53
      war/plugins/import.js
  22. 1 0
      war/resources/dia.txt
  23. 1 0
      war/resources/dia_am.txt
  24. 1 0
      war/resources/dia_ar.txt
  25. 1 0
      war/resources/dia_bg.txt
  26. 1 0
      war/resources/dia_bn.txt
  27. 1 0
      war/resources/dia_bs.txt
  28. 1 0
      war/resources/dia_ca.txt
  29. 1 0
      war/resources/dia_cs.txt
  30. 1 0
      war/resources/dia_da.txt
  31. 1 0
      war/resources/dia_de.txt
  32. 1 0
      war/resources/dia_el.txt
  33. 1 0
      war/resources/dia_eo.txt
  34. 1 0
      war/resources/dia_es.txt
  35. 1 0
      war/resources/dia_et.txt
  36. 32 31
      war/resources/dia_fa.txt
  37. 1 0
      war/resources/dia_fi.txt
  38. 1 0
      war/resources/dia_fil.txt
  39. 1 0
      war/resources/dia_fr.txt
  40. 1 0
      war/resources/dia_gu.txt
  41. 1 0
      war/resources/dia_he.txt
  42. 1 0
      war/resources/dia_hi.txt
  43. 1 0
      war/resources/dia_hr.txt
  44. 1 0
      war/resources/dia_hu.txt
  45. 1 0
      war/resources/dia_i18n.txt
  46. 1 0
      war/resources/dia_id.txt
  47. 1 0
      war/resources/dia_it.txt
  48. 1 0
      war/resources/dia_ja.txt
  49. 1 0
      war/resources/dia_kn.txt
  50. 1 0
      war/resources/dia_ko.txt
  51. 1 0
      war/resources/dia_lt.txt
  52. 1 0
      war/resources/dia_lv.txt
  53. 1 0
      war/resources/dia_ml.txt
  54. 1 0
      war/resources/dia_mr.txt
  55. 1 0
      war/resources/dia_ms.txt
  56. 1 0
      war/resources/dia_nl.txt
  57. 1 0
      war/resources/dia_no.txt
  58. 1 0
      war/resources/dia_pl.txt
  59. 1 0
      war/resources/dia_pt-br.txt
  60. 1 0
      war/resources/dia_pt.txt
  61. 1 0
      war/resources/dia_ro.txt
  62. 1 0
      war/resources/dia_ru.txt
  63. 1 0
      war/resources/dia_sk.txt
  64. 1 0
      war/resources/dia_sl.txt
  65. 1 0
      war/resources/dia_sr.txt
  66. 1 0
      war/resources/dia_sv.txt
  67. 1 0
      war/resources/dia_sw.txt
  68. 1 0
      war/resources/dia_ta.txt
  69. 1 0
      war/resources/dia_te.txt
  70. 1 0
      war/resources/dia_th.txt
  71. 1 0
      war/resources/dia_tr.txt
  72. 1 0
      war/resources/dia_uk.txt
  73. 1 0
      war/resources/dia_vi.txt
  74. 1 0
      war/resources/dia_zh-tw.txt
  75. 1 0
      war/resources/dia_zh.txt

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+17-JUL-2017: 6.8.17
+
+- Adds dialog for importing large images
+- Fixes sorting of properties in metadata dialog for IE 11
+- Fixes handling of lineHeight in IE 11
+
 16-JUL-2017: 6.8.16
 
 - Makes ref optional in value dialog for GitHub

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.8.16
+6.8.17

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/16/2017 05:36 PM
+# 07/17/2017 03:24 PM
 
 app.html
 index.html?offline=1

二进制
war/images/img-hi-res.png


二进制
war/images/img-lo-res.png


文件差异内容过多而无法显示
+ 389 - 392
war/js/app.min.js


文件差异内容过多而无法显示
+ 318 - 314
war/js/atlas-viewer.min.js


文件差异内容过多而无法显示
+ 350 - 353
war/js/atlas.min.js


+ 52 - 6
war/js/diagramly/Dialogs.js

@@ -685,7 +685,7 @@ var SplashDialog = function(editorUi)
 /**
  * 
  */
-var ConfirmDialog = function(editorUi, message, okFn, cancelFn, okLabel, cancelLabel)
+var ConfirmDialog = function(editorUi, message, okFn, cancelFn, okLabel, cancelLabel, okImg, cancelImg, showRememberOption)
 {
 	var div = document.createElement('div');
 	div.style.textAlign = 'center';
@@ -704,20 +704,32 @@ var ConfirmDialog = function(editorUi, message, okFn, cancelFn, okLabel, cancelL
 	div.appendChild(p2);
 	
 	var btns = document.createElement('div');
-	btns.style.marginTop = '16px';
 	btns.style.textAlign = 'center';
-	
+	btns.style.whiteSpace = 'nowrap';
+
+	var cb = document.createElement('input');
+	cb.setAttribute('type', 'checkbox');
+
 	var cancelBtn = mxUtils.button(cancelLabel || mxResources.get('cancel'), function()
 	{
 		editorUi.hideDialog();
 		
 		if (cancelFn != null)
 		{
-			cancelFn();
+			cancelFn(cb.checked);
 		}
 	});
 	cancelBtn.className = 'geBtn';
 	
+	if (cancelImg != null)
+	{
+		cancelBtn.innerHTML = cancelImg + '<br>' + cancelBtn.innerHTML;
+		cancelBtn.style.paddingBottom = '8px';
+		cancelBtn.style.paddingTop = '8px';
+		cancelBtn.style.height = 'auto';
+		cancelBtn.style.width = '40%';
+	}
+	
 	if (editorUi.editor.cancelFirst)
 	{
 		btns.appendChild(cancelBtn);
@@ -729,12 +741,24 @@ var ConfirmDialog = function(editorUi, message, okFn, cancelFn, okLabel, cancelL
 		
 		if (okFn != null)
 		{
-			okFn();
+			okFn(cb.checked);
 		}
 	});
 	btns.appendChild(okBtn);
 	
-	okBtn.className = 'geBtn gePrimaryBtn';
+	if (okImg != null)
+	{
+		okBtn.innerHTML = okImg + '<br>' + okBtn.innerHTML + '<br>';
+		okBtn.style.paddingBottom = '8px';
+		okBtn.style.paddingTop = '8px';
+		okBtn.style.height = 'auto';
+		okBtn.className = 'geBtn';
+		okBtn.style.width = '40%';
+	}
+	else
+	{
+		okBtn.className = 'geBtn gePrimaryBtn';
+	}
 	
 	if (!editorUi.editor.cancelFirst)
 	{
@@ -742,6 +766,28 @@ var ConfirmDialog = function(editorUi, message, okFn, cancelFn, okLabel, cancelL
 	}
 
 	div.appendChild(btns);
+	
+	if (showRememberOption)
+	{
+		btns.style.marginTop = '10px';
+		var p2 = document.createElement('p');
+		p2.style.marginTop = '20px';
+		p2.appendChild(cb);
+		var span = document.createElement('span');
+		mxUtils.write(span, ' ' + mxResources.get('rememberThisSetting'));
+		p2.appendChild(span);
+		div.appendChild(p2);
+		
+		mxEvent.addListener(span, 'click', function(evt)
+		{
+			cb.checked = !cb.checked;
+			mxEvent.consume(evt);
+		});
+	}
+	else
+	{
+		btns.style.marginTop = '16px';
+	}
 
 	this.container = div;
 };

文件差异内容过多而无法显示
+ 10 - 0
war/js/diagramly/Editor.js


+ 347 - 251
war/js/diagramly/EditorUi.js

@@ -4993,9 +4993,10 @@
 	 * Imports the given XML into the existing diagram.
 	 * TODO: Make this function asynchronous
 	 */
-	EditorUi.prototype.insertTextAt = function(text, dx, dy, html, asImage, crop)
+	EditorUi.prototype.insertTextAt = function(text, dx, dy, html, asImage, crop, resizeImages)
 	{
 		crop = (crop != null) ? crop : true;
+		resizeImages = (resizeImages != null) ? resizeImages : true;
 		
 		// Handles special case for Gliffy data which requires async server-side for parsing
 		if (text != null)
@@ -5070,7 +5071,7 @@
 							graph.setSelectionCell(graph.insertVertex(null, null, '', graph.snap(dx), graph.snap(dy),
 									w2, h2, 'shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;' +
 									'verticalAlign=top;aspect=fixed;imageAspect=0;image=' + this.convertDataUri(data2) + ';'));
-	    				}), true, this.maxImageSize);
+	    				}), resizeImages, this.maxImageSize);
 					}
 					else
 					{
@@ -5382,287 +5383,364 @@
 		maxBytes = (maxBytes != null) ? maxBytes : this.maxImageBytes;
 		resizeImages = (resizeImages != null) ? resizeImages : true;
 		
-		var graph = this.editor.graph;
-		var gs = graph.gridSize;
-
-		fn = (fn != null) ? fn : mxUtils.bind(this, function(data, mimeType, x, y, w, h, filename, done, file)
+		// Checks if large images are imported
+		var largeImages = false;
+		
+		if (!mxClient.IS_CHROMEAPP && files != null)
 		{
-			if (data != null && data.substring(0, 10) == '<mxlibrary')
-			{
-				this.spinner.stop();
-				this.loadLibrary(new LocalLibrary(this, data, filename));
-    			
-    			return null;
-			}
-			else
+			var thresh = resampleThreshold || this.resampleThreshold;
+			
+			for (var i = 0; i < files.length; i++)
 			{
-				return this.importFile(data, mimeType, x, y, w, h, filename, done, file, crop, ignoreEmbeddedXml);
+				if (files[i].type.substring(0, 6) == 'image/' && files[i].size > thresh)
+				{
+					largeImages = true;
+					
+					break;
+				}
 			}
-		});
-		
-		resultFn = (resultFn != null) ? resultFn : mxUtils.bind(this, function(cells)
-		{
-			graph.setSelectionCells(cells);
-		});
+		}
 
-		if (this.spinner.spin(document.body, mxResources.get('loading')))
+		var doImportFiles = mxUtils.bind(this, function()
 		{
-			var count = files.length;
-			var remain = count;
-			var queue = [];
+			var graph = this.editor.graph;
+			var gs = graph.gridSize;
+	
+			fn = (fn != null) ? fn : mxUtils.bind(this, function(data, mimeType, x, y, w, h, filename, done, file)
+			{
+				if (data != null && data.substring(0, 10) == '<mxlibrary')
+				{
+					this.spinner.stop();
+					this.loadLibrary(new LocalLibrary(this, data, filename));
+	    			
+	    			return null;
+				}
+				else
+				{
+					return this.importFile(data, mimeType, x, y, w, h, filename, done, file, crop, ignoreEmbeddedXml);
+				}
+			});
 			
-			// Barrier waits for all files to be loaded asynchronously
-			var barrier = mxUtils.bind(this, function(index, fnc)
+			resultFn = (resultFn != null) ? resultFn : mxUtils.bind(this, function(cells)
 			{
-				queue[index] = fnc;
+				graph.setSelectionCells(cells);
+			});
+	
+			if (this.spinner.spin(document.body, mxResources.get('loading')))
+			{
+				var count = files.length;
+				var remain = count;
+				var queue = [];
 				
-				if (--remain == 0)
+				// Barrier waits for all files to be loaded asynchronously
+				var barrier = mxUtils.bind(this, function(index, fnc)
 				{
-					this.spinner.stop();
+					queue[index] = fnc;
 					
-					if (barrierFn != null)
-					{
-						barrierFn(queue);
-					}
-					else
+					if (--remain == 0)
 					{
-						var cells = [];
+						this.spinner.stop();
 						
-						graph.getModel().beginUpdate();
-						try
+						if (barrierFn != null)
 						{
-					    	for (var j = 0; j < queue.length; j++)
-					    	{
-					    		var tmp = queue[j]();
-					    		
-					    		if (tmp != null)
-					    		{
-					    			cells = cells.concat(tmp);
-					    		}
-					    	}
+							barrierFn(queue);
 						}
-						finally
+						else
 						{
-							graph.getModel().endUpdate();
+							var cells = [];
+							
+							graph.getModel().beginUpdate();
+							try
+							{
+						    	for (var j = 0; j < queue.length; j++)
+						    	{
+						    		var tmp = queue[j]();
+						    		
+						    		if (tmp != null)
+						    		{
+						    			cells = cells.concat(tmp);
+						    		}
+						    	}
+							}
+							finally
+							{
+								graph.getModel().endUpdate();
+							}
 						}
+						
+						resultFn(cells);
 					}
-					
-					resultFn(cells);
-				}
-			});
-			
-			for (var i = 0; i < count; i++)
-			{
-				(mxUtils.bind(this, function(index)
+				});
+				
+				for (var i = 0; i < count; i++)
 				{
-					var file = files[index];
-					var reader = new FileReader();
-					
-					reader.onload = mxUtils.bind(this, function(e)
+					(mxUtils.bind(this, function(index)
 					{
-						if (filterFn == null || filterFn(file))
+						var file = files[index];
+						var reader = new FileReader();
+						
+						reader.onload = mxUtils.bind(this, function(e)
 						{
-				    		if (file.type.substring(0, 6) == 'image/')
-				    		{
-				    			if (file.type.substring(0, 9) == 'image/svg')
-				    			{
-				    				// Checks if SVG contains content attribute
-			    					var data = e.target.result;
-			    					var comma = data.indexOf(',');
-			    					var svgText = atob(data.substring(comma + 1));
-			    					var root = mxUtils.parseXml(svgText);
-		    						var svgs = root.getElementsByTagName('svg');
-		    						
-		    						if (svgs.length > 0)
-			    					{
-		    							var svgRoot = svgs[0];
-				    					var cont = (ignoreEmbeddedXml) ? null : svgRoot.getAttribute('content');
-
-				    					if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%')
-				    					{
-				    						cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true));
-				    					}
-				    					
-				    					if (cont != null && cont.charAt(0) == '%')
-				    					{
-				    						cont = decodeURIComponent(cont);
-				    					}
-
-				    					if (cont != null && (cont.substring(0, 8) === '<mxfile ' ||
-				    						cont.substring(0, 14) === '<mxGraphModel '))
-				    					{
-				    						barrier(index, mxUtils.bind(this, function()
-						    				{
-						    					return fn(cont, 'text/xml', x + index * gs, y + index * gs, 0, 0, file.name);	
-						    				}));
-				    					}
-				    					else
+							if (filterFn == null || filterFn(file))
+							{
+					    		if (file.type.substring(0, 6) == 'image/')
+					    		{
+					    			if (file.type.substring(0, 9) == 'image/svg')
+					    			{
+					    				// Checks if SVG contains content attribute
+				    					var data = e.target.result;
+				    					var comma = data.indexOf(',');
+				    					var svgText = atob(data.substring(comma + 1));
+				    					var root = mxUtils.parseXml(svgText);
+			    						var svgs = root.getElementsByTagName('svg');
+			    						
+			    						if (svgs.length > 0)
 				    					{
-						    				// SVG needs special handling to add viewbox if missing and
-						    				// find initial size from SVG attributes (only for IE11)
-						    				barrier(index, mxUtils.bind(this, function()
-						    				{
-					    						try
-					    						{
-							    					var prefix = data.substring(0, comma + 1);
-							    					
-							    					// Parses SVG and find width and height
-							    					if (root != null)
-							    					{
-							    						var svgs = root.getElementsByTagName('svg');
-							    						
-							    						if (svgs.length > 0)
-								    					{
-							    							var svgRoot = svgs[0];
-								    						var w = parseFloat(svgRoot.getAttribute('width'));
-								    						var h = parseFloat(svgRoot.getAttribute('height'));
-								    						
-								    						// Check if viewBox attribute already exists
-								    						var vb = svgRoot.getAttribute('viewBox');
-								    						
-								    						if (vb == null || vb.length == 0)
-								    						{
-								    							svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
-								    						}
-								    						// Uses width and height from viewbox for
-								    						// missing width and height attributes
-								    						else if (isNaN(w) || isNaN(h))
-								    						{
-								    							var tokens = vb.split(' ');
-								    							
-								    							if (tokens.length > 3)
-								    							{
-								    								w = parseFloat(tokens[2]);
-								    								h = parseFloat(tokens[3]);
-								    							}
-								    						}
+			    							var svgRoot = svgs[0];
+					    					var cont = (ignoreEmbeddedXml) ? null : svgRoot.getAttribute('content');
 	
-								    						data = this.createSvgDataUri(mxUtils.getXml(svgs[0]));
-								    						
-								    						var s = Math.min(1, Math.min(maxSize / Math.max(1, w)), maxSize / Math.max(1, h));
-										    				
-										    				return fn(data, file.type, x + index * gs, y + index * gs,
-										    					Math.max(1, Math.round(w * s)), Math.max(1, Math.round(h * s)), file.name);
-								    					}
-							    					}
-					    						}
-					    						catch (e)
-					    						{
-					    							// ignores any SVG parsing errors
-					    						}
-						    					
-						    					return null;
-						    				}));
-				    					}
-			    					}
-				    			}
-				    			else
-				    			{
-				    				// Checks if PNG+XML is available to bypass code below
-				    				var containsModel = false;
-				    				
-				    				if (file.type == 'image/png')
-				    				{
-				    					var xml = (ignoreEmbeddedXml) ? null : this.extractGraphModelFromPng(e.target.result);
-				    					
-				    					if (xml != null && xml.length > 0)
-				    					{
-				    						var img = new Image();
-				    						img.src = e.target.result;
-				    						
-						    				barrier(index, mxUtils.bind(this, function()
-						    				{
-						    					return fn(xml, 'text/xml', x + index * gs, y + index * gs,
-						    						img.width, img.height, file.name);	
-						    				}));
-				    						
-				    						containsModel = true;
-				    					}
-				    				}
-				    				
-					    			// Additional asynchronous step for finding image size
-				    				if (!containsModel)
-				    				{
-				    					// Cannot load local files in Chrome App
-				    					if (mxClient.IS_CHROMEAPP)
-				    					{
-				    						this.spinner.stop();
-				    						this.showError(mxResources.get('error'), mxResources.get('dragAndDropNotSupported'),
-				    							mxResources.get('cancel'), mxUtils.bind(this, function()
-			    								{
-			    									// Hides the dialog
-			    								}), null, mxResources.get('ok'), mxUtils.bind(this, function()
-			    								{
-				    								// Redirects to import function
-			    									this.actions.get('import').funct();
-			    								})
-			    							);
-				    					}
-				    					else
-				    					{
-							    			this.loadImage(e.target.result, mxUtils.bind(this, function(img)
-							    			{
-							    				this.resizeImage(img, e.target.result, mxUtils.bind(this, function(data2, w2, h2)
+					    					if (cont != null && cont.charAt(0) != '<' && cont.charAt(0) != '%')
+					    					{
+					    						cont = unescape((window.atob) ? atob(cont) : Base64.decode(cont, true));
+					    					}
+					    					
+					    					if (cont != null && cont.charAt(0) == '%')
+					    					{
+					    						cont = decodeURIComponent(cont);
+					    					}
+	
+					    					if (cont != null && (cont.substring(0, 8) === '<mxfile ' ||
+					    						cont.substring(0, 14) === '<mxGraphModel '))
+					    					{
+					    						barrier(index, mxUtils.bind(this, function()
 							    				{
-								    				barrier(index, mxUtils.bind(this, function()
-										    		{
-								    					// Refuses to insert images above a certain size as they kill the app
-								    					if (data2 != null && data2.length < maxBytes)
-								    					{
-									    					var s = (!resizeImages || !this.isResampleImage(e.target.result)) ? 1 : Math.min(1, Math.min(maxSize / w2, maxSize / h2));
-										    				
-									    					return fn(data2, file.type, x + index * gs, y + index * gs, Math.round(w2 * s), Math.round(h2 * s), file.name);
-								    					}
-								    					else
+							    					return fn(cont, 'text/xml', x + index * gs, y + index * gs, 0, 0, file.name);	
+							    				}));
+					    					}
+					    					else
+					    					{
+							    				// SVG needs special handling to add viewbox if missing and
+							    				// find initial size from SVG attributes (only for IE11)
+							    				barrier(index, mxUtils.bind(this, function()
+							    				{
+						    						try
+						    						{
+								    					var prefix = data.substring(0, comma + 1);
+								    					
+								    					// Parses SVG and find width and height
+								    					if (root != null)
 								    					{
-								    						this.handleError({message: mxResources.get('imageTooBig')});
+								    						var svgs = root.getElementsByTagName('svg');
 								    						
-								    						return null;
+								    						if (svgs.length > 0)
+									    					{
+								    							var svgRoot = svgs[0];
+									    						var w = parseFloat(svgRoot.getAttribute('width'));
+									    						var h = parseFloat(svgRoot.getAttribute('height'));
+									    						
+									    						// Check if viewBox attribute already exists
+									    						var vb = svgRoot.getAttribute('viewBox');
+									    						
+									    						if (vb == null || vb.length == 0)
+									    						{
+									    							svgRoot.setAttribute('viewBox', '0 0 ' + w + ' ' + h);
+									    						}
+									    						// Uses width and height from viewbox for
+									    						// missing width and height attributes
+									    						else if (isNaN(w) || isNaN(h))
+									    						{
+									    							var tokens = vb.split(' ');
+									    							
+									    							if (tokens.length > 3)
+									    							{
+									    								w = parseFloat(tokens[2]);
+									    								h = parseFloat(tokens[3]);
+									    							}
+									    						}
+		
+									    						data = this.createSvgDataUri(mxUtils.getXml(svgs[0]));
+									    						
+									    						var s = Math.min(1, Math.min(maxSize / Math.max(1, w)), maxSize / Math.max(1, h));
+											    				
+											    				return fn(data, file.type, x + index * gs, y + index * gs,
+											    					Math.max(1, Math.round(w * s)), Math.max(1, Math.round(h * s)), file.name);
+									    					}
 								    					}
-										    		}));
-							    				}), resizeImages, maxSize, resampleThreshold);
-							    			}));
+						    						}
+						    						catch (e)
+						    						{
+						    							// ignores any SVG parsing errors
+						    						}
+							    					
+							    					return null;
+							    				}));
+					    					}
 				    					}
-				    				}
-				    			}
-				    		}
-				    		else
-				    		{
-								fn(e.target.result, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells)
-								{
-									barrier(index, function()
-		    	    				{
-		    		    				return cells;
-		    	    				});
-								});
-				    		}
+					    			}
+					    			else
+					    			{
+					    				// Checks if PNG+XML is available to bypass code below
+					    				var containsModel = false;
+					    				
+					    				if (file.type == 'image/png')
+					    				{
+					    					var xml = (ignoreEmbeddedXml) ? null : this.extractGraphModelFromPng(e.target.result);
+					    					
+					    					if (xml != null && xml.length > 0)
+					    					{
+					    						var img = new Image();
+					    						img.src = e.target.result;
+					    						
+							    				barrier(index, mxUtils.bind(this, function()
+							    				{
+							    					return fn(xml, 'text/xml', x + index * gs, y + index * gs,
+							    						img.width, img.height, file.name);	
+							    				}));
+					    						
+					    						containsModel = true;
+					    					}
+					    				}
+					    				
+						    			// Additional asynchronous step for finding image size
+					    				if (!containsModel)
+					    				{
+					    					// Cannot load local files in Chrome App
+					    					if (mxClient.IS_CHROMEAPP)
+					    					{
+					    						this.spinner.stop();
+					    						this.showError(mxResources.get('error'), mxResources.get('dragAndDropNotSupported'),
+					    							mxResources.get('cancel'), mxUtils.bind(this, function()
+				    								{
+				    									// Hides the dialog
+				    								}), null, mxResources.get('ok'), mxUtils.bind(this, function()
+				    								{
+					    								// Redirects to import function
+				    									this.actions.get('import').funct();
+				    								})
+				    							);
+					    					}
+					    					else
+					    					{
+								    			this.loadImage(e.target.result, mxUtils.bind(this, function(img)
+								    			{
+								    				this.resizeImage(img, e.target.result, mxUtils.bind(this, function(data2, w2, h2)
+								    				{
+									    				barrier(index, mxUtils.bind(this, function()
+											    		{
+									    					// Refuses to insert images above a certain size as they kill the app
+									    					if (data2 != null && data2.length < maxBytes)
+									    					{
+										    					var s = (!resizeImages || !this.isResampleImage(e.target.result, resampleThreshold)) ? 1 : Math.min(1, Math.min(maxSize / w2, maxSize / h2));
+											    				
+										    					return fn(data2, file.type, x + index * gs, y + index * gs, Math.round(w2 * s), Math.round(h2 * s), file.name);
+									    					}
+									    					else
+									    					{
+									    						this.handleError({message: mxResources.get('imageTooBig')});
+									    						
+									    						return null;
+									    					}
+											    		}));
+								    				}), resizeImages, maxSize, resampleThreshold);
+								    			}));
+					    					}
+					    				}
+					    			}
+					    		}
+					    		else
+					    		{
+									fn(e.target.result, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells)
+									{
+										barrier(index, function()
+			    	    				{
+			    		    				return cells;
+			    	    				});
+									});
+					    		}
+							}
+						});
+						
+						// Handles special case of binary file where the reader should not be used
+						if (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name))
+						{
+							fn(null, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells)
+							{
+								barrier(index, function()
+	    	    				{
+	    		    				return cells;
+	    	    				});
+							}, file);
 						}
-					});
-					
-					// Handles special case of binary file where the reader should not be used
-					if (/(\.vsdx)($|\?)/i.test(file.name) || /(\.vssx)($|\?)/i.test(file.name))
-					{
-						fn(null, file.type, x + index * gs, y + index * gs, 240, 160, file.name, function(cells)
+						else if (file.type.substring(0, 5) == 'image')
 						{
-							barrier(index, function()
-    	    				{
-    		    				return cells;
-    	    				});
-						}, file);
-					}
-					else if (file.type.substring(0, 5) == 'image')
-					{
-						reader.readAsDataURL(file);
-					}
-					else
-					{
-						reader.readAsText(file);
-					}
-				}))(i);
+							reader.readAsDataURL(file);
+						}
+						else
+						{
+							reader.readAsText(file);
+						}
+					}))(i);
+				}
 			}
+		});
+		
+		if (largeImages && resizeImages)
+		{
+			this.confirmImageResize(function(doResize)
+			{
+				resizeImages = doResize;
+				doImportFiles();
+			});
+		}
+		else
+		{
+			doImportFiles();
 		}
 	};
 
+	/**
+	 * Parses the file using XHR2 via the server. File can be a blob or file object.
+	 * Filename is an optional parameter for blobs (that do not have a filename).
+	 */
+	EditorUi.prototype.confirmImageResize = function(fn)
+	{
+		var resume = (this.spinner != null && this.spinner.pause != null) ? this.spinner.pause() : function() {};
+		var wrapper = function(remember, resize)
+		{
+			if (remember)
+			{
+				mxSettings.setResizeImages(resize);
+				mxSettings.save();
+			}
+			
+			resume();
+			fn(resize);
+		};
+		
+		var resizeImages = (isLocalStorage || mxClient.IS_CHROMEAPP) ? mxSettings.getResizeImages() : null;
+		
+		if (resizeImages != null)
+		{
+			wrapper(false, resizeImages);
+		}
+		else
+		{
+			this.showDialog(new ConfirmDialog(this, mxResources.get('resizeLargeImages'),
+			function(remember)
+			{
+				wrapper(remember, true);
+			},
+			function(remember)
+			{
+				wrapper(remember, false);
+			}, mxResources.get('resize'), mxResources.get('actualSize'),
+			'<img style="margin-top:8px;" src="' + Editor.loResImage + '"/>',
+			'<img style="margin-top:8px;" src="' + Editor.hiResImage + '"/>',
+			isLocalStorage || mxClient.IS_CHROMEAPP).container, 340,
+			(isLocalStorage || mxClient.IS_CHROMEAPP) ? 220 : 200, true, true);
+		}
+	};
+	
 	/**
 	 * Parses the file using XHR2 via the server. File can be a blob or file object.
 	 * Filename is an optional parameter for blobs (that do not have a filename).
@@ -6707,7 +6785,25 @@
 				    			}
 				    		}
 				    		
-					    	graph.setSelectionCells(this.insertTextAt(html, x, y, true, asImage));
+				    		var resizeImages = !mxEvent.isControlDown(evt);
+				    		
+				    		var doInsert = mxUtils.bind(this, function()
+				    		{
+				    			graph.setSelectionCells(this.insertTextAt(html, x, y, true, asImage, null, resizeImages));
+				    		});
+				    		
+				    		if (asImage && resizeImages && html.length > this.resampleThreshold)
+				    		{
+				    			this.confirmImageResize(function(doResize)
+		    					{
+		    						resizeImages = doResize;
+		    						doInsert();
+		    					});
+				    		}
+				    		else
+			    			{
+				    			doInsert();
+			    			}
 					    }
 				    	else if (uri != null && (/\.(gif|jpg|jpeg|tiff|png|svg)$/i).test(uri))
 						{

+ 29 - 11
war/js/diagramly/Menus.js

@@ -1501,17 +1501,35 @@
 				{
 					editorUi.loadImage(data, mxUtils.bind(this, function(img)
 	    			{
-	    				editorUi.resizeImage(img, data, mxUtils.bind(this, function(data2, w2, h2)
-	    				{
-		    				var s = Math.min(1, Math.min(editorUi.maxImageSize / w2, editorUi.maxImageSize / h2));
-
-							editorUi.importFile(data, mime, x, y, Math.round(w2 * s), Math.round(h2 * s), filename, function(cells)
-							{
-								editorUi.spinner.stop();
-								graph.setSelectionCells(cells);
-								graph.scrollCellToVisible(graph.getSelectionCell());
-							});
-	    				}), true);
+			    		var resizeImages = true;
+			    		
+			    		var doInsert = mxUtils.bind(this, function()
+			    		{
+		    				editorUi.resizeImage(img, data, mxUtils.bind(this, function(data2, w2, h2)
+    	    				{
+    		    				var s = (resizeImages) ? Math.min(1, Math.min(editorUi.maxImageSize / w2, editorUi.maxImageSize / h2)) : 1;
+
+    							editorUi.importFile(data, mime, x, y, Math.round(w2 * s), Math.round(h2 * s), filename, function(cells)
+    							{
+    								editorUi.spinner.stop();
+    								graph.setSelectionCells(cells);
+    								graph.scrollCellToVisible(graph.getSelectionCell());
+    							});
+    	    				}), resizeImages);
+			    		});
+			    		
+			    		if (data.length > editorUi.resampleThreshold)
+			    		{
+			    			editorUi.confirmImageResize(function(doResize)
+	    					{
+	    						resizeImages = doResize;
+	    						doInsert();
+	    					});
+			    		}
+			    		else
+		    			{
+			    			doInsert();
+		    			}
 	    			}), mxUtils.bind(this, function()
 	    			{
 	    				editorUi.handleError({message: mxResources.get('cannotOpenFile')});

+ 10 - 1
war/js/diagramly/Settings.js

@@ -10,7 +10,7 @@ var mxSettings =
 	/**
 	 * Defines current version of settings.
 	 */
-	currentVersion: 14,
+	currentVersion: 15,
 	
 	defaultFormatWidth: (screen.width < 600) ? '0' : '240',
 	
@@ -57,6 +57,14 @@ var mxSettings =
 	{
 		mxSettings.settings.autosave = autosave;
 	},
+	getResizeImages: function()
+	{
+		return mxSettings.settings.resizeImages;
+	},
+	setResizeImages: function(resizeImages)
+	{
+		mxSettings.settings.resizeImages = resizeImages;
+	},
 	getLibraries: function()
 	{
 		return mxSettings.settings.libraries;
@@ -170,6 +178,7 @@ var mxSettings =
 			showStartScreen: true,
 			gridColor: mxGraphView.prototype.gridColor,
 			autosave: true,
+			resizeImages: null,
 			version: mxSettings.currentVersion,
 			// Only defined and true for new settings which haven't been saved
 			isNew: true

文件差异内容过多而无法显示
+ 2 - 103
war/js/diagramly/sidebar/Sidebar-Gmdl.js


文件差异内容过多而无法显示
+ 1 - 1
war/js/embed-static.min.js


+ 15 - 4
war/js/mxgraph/Dialogs.js

@@ -1349,7 +1349,7 @@ var EditDataDialog = function(ui, cell)
 		var img = mxUtils.createImage(Dialog.prototype.closeImage);
 		img.style.height = '9px';
 		img.style.fontSize = '9px';
-		img.style.marginBottom = '7px';
+		img.style.marginBottom = (mxClient.IS_IE11) ? '-1px' : '5px';
 		
 		removeAttr.className = 'geButton';
 		removeAttr.setAttribute('title', mxResources.get('delete'));
@@ -1413,7 +1413,18 @@ var EditDataDialog = function(ui, cell)
 	// Sorts by name
 	temp.sort(function(a, b)
 	{
-		return ~~(a.name > b.name);
+	    if (a.name < b.name)
+	    {
+	    	return -1;
+	    }
+	    else if (a.name > b.name)
+	    {
+	    	return 1;
+	    }
+	    else
+	    {
+	    	return 0;
+	    }
 	});
 	
 	for (var i = 0; i < temp.length; i++)
@@ -1431,7 +1442,7 @@ var EditDataDialog = function(ui, cell)
 	var nameInput = document.createElement('input');
 	nameInput.setAttribute('placeholder', mxResources.get('enterPropertyName'));
 	nameInput.setAttribute('type', 'text');
-	nameInput.setAttribute('size', (mxClient.IS_QUIRKS) ? '18' : '22');
+	nameInput.setAttribute('size', (mxClient.IS_QUIRKS || mxClient.IS_IE11) ? '18' : '22');
 	nameInput.style.marginLeft = '2px';
 
 	newProp.appendChild(nameInput);
@@ -1611,7 +1622,7 @@ var EditDataDialog = function(ui, cell)
 			var icon = document.createElement('img');
 			icon.setAttribute('border', '0');
 			icon.setAttribute('valign', 'middle');
-			icon.style.marginTop = '-4px';
+			icon.style.marginTop = (mxClient.IS_IE11) ? '0px' : '-4px';
 			icon.setAttribute('src', Editor.helpImage);
 			link.appendChild(icon);
 			

+ 7 - 0
war/js/mxgraph/Format.js

@@ -3156,6 +3156,13 @@ TextFormatPanel.prototype.addFont = function(container)
 					
 					if (node != null)
 					{
+						// Workaround for commonAncestor on range in IE11 returning parent of common ancestor
+						if (node == graph.cellEditor.textarea && graph.cellEditor.textarea.children.length == 1 &&
+							graph.cellEditor.textarea.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT)
+						{
+							node = graph.cellEditor.textarea.firstChild;
+						}
+						
 						var css = mxUtils.getCurrentStyle(node);
 						
 						if (css != null)

+ 11 - 0
war/js/mxgraph/Sidebar.js

@@ -425,6 +425,17 @@ Sidebar.prototype.hideTooltip = function()
 	}
 };
 
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.addDataEntry = function(tags, width, height, title, data)
+{
+	return this.addEntry(tags, mxUtils.bind(this, function()
+	{
+	   	return this.createVertexTemplateFromData(data, width, height, title);
+	}));
+};
+
 /**
  * Hides the current tooltip.
  */

文件差异内容过多而无法显示
+ 1 - 1
war/js/reader.min.js


文件差异内容过多而无法显示
+ 318 - 314
war/js/viewer.min.js


+ 82 - 53
war/plugins/import.js

@@ -2,12 +2,13 @@
  * Plugin for Freemind import.
  * See https://github.com/jiangxin/freemind-mmx/tree/master/freemind
  */
-Draw.loadPlugin(function(ui) {
+Draw.loadPlugin(function(ui)
+{
 	var graph = ui.editor.graph;
-	
+
 	// Adds resource for action
 	mxResources.parse('importFreemind=Freemind');
-	
+
 	// Parses Freemind data
 	function importFreemindData(data)
 	{
@@ -15,105 +16,133 @@ Draw.loadPlugin(function(ui) {
 		// is normally the first child of the root (ie. layer 0).
 		var defaultParent = graph.getDefaultParent();
 		var cells = [];
-		
+
 		var defaultWidth = 80;
 		var defaultHeight = 30;
 		var mainConceptHeight = 40;
-		var defaultHorizontalSpaceBetweenVertex = 40; 
+		var defaultHorizontalSpaceBetweenVertex = 40;
 		var defaultVerticalSpaceBetweenVertex = 10;
 
-		var freeMindMainConceptVertexStyle = "ellipse;whiteSpace=wrap;html=1;align=center;collapsible=0;container=1;recursiveResize=0;";
-		var freeMindBranchVertexStyle = "whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;collapsible=0;container=1;recursiveResize=0;autosize=1;";
-		var freeMindConceptVertexStyle = "whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;collapsible=0;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;";
-		var freeMindEdgeStyle = "edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;html=1;";
-		
+		var freeMindMainConceptVertexStyle = 'ellipse;whiteSpace=wrap;html=1;align=center;collapsible=0;container=1;recursiveResize=0;';
+		var freeMindBranchVertexStyle = 'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;collapsible=0;container=1;recursiveResize=0;autosize=1;';
+		var freeMindConceptVertexStyle = 'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;collapsible=0;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;';
+		var freeMindEdgeStyle = 'edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;html=1;';
+
 		// Tells whether or not a node has child ideas
-		var hasChilds = function(node){
-			for (var i = 0; i < node.childNodes.length; i++){
-				if (node.childNodes[i].nodeName == "node"){
+		var hasChilds = function(node)
+		{
+			for (var i = 0; i < node.childNodes.length; i++)
+			{
+				if (node.childNodes[i].nodeName == 'node')
+				{
 					return true;
 				}
 			}
+			
 			return false;
 		};
-		
+
 		// Generates useful info on the nodes to be used later.
-		var generatePreprocessingNodeInfo = function(node){
+		var generatePreprocessingNodeInfo = function(node)
+		{
 			var childCount = 0;
 			var maxChildsInHierarchy = 0;
-			for (var i = 0; i < node.childNodes.length; i++){
+			
+			for (var i = 0; i < node.childNodes.length; i++)
+			{
 				var childNode = node.childNodes[i];
-				if (childNode.nodeName == "node"){
+				
+				if (childNode.nodeName == 'node')
+				{
 					var maxChilds = generatePreprocessingNodeInfo(childNode);
 					maxChildsInHierarchy = Math.max(maxChildsInHierarchy, maxChilds);
 					childCount++;
 				}
 			}
-			node.childCount = childCount; 
+			
+			node.childCount = childCount;
 			node.maxChilds = Math.max(childCount, maxChildsInHierarchy);
 			return childCount;
 		}
-		
+
 		// Main node generation funcion (recursive)
-		var processFreeMindNode = function(node, nodeParent, x, y){
+		var processFreeMindNode = function(node, nodeParent, x, y)
+		{
 			var mainConcept = false;
 			var vertexStyle = freeMindBranchVertexStyle;
-			if (nodeParent == defaultParent){
+			
+			if (nodeParent == defaultParent)
+			{
 				mainConcept = true;
 				vertexStyle = freeMindMainConceptVertexStyle;
-			}else if (hasChilds(node)){
+			}
+			else if (hasChilds(node))
+			{
 				// Concept, style appropiately
 				vertexStyle = freeMindConceptVertexStyle;
 			}
-			var nodeName = node.getAttribute('TEXT') || "";
-			var nodeVertex = graph.insertVertex(defaultParent, null, nodeName, x, y, defaultWidth, defaultHeight, vertexStyle);
-			graph.cellLabelChanged(nodeVertex,nodeName,true);
-			if (mainConcept){
+			
+			var nodeName = node.getAttribute('TEXT') || '';
+			var nodeVertex = graph.insertVertex(defaultParent, null, nodeName, x, y, defaultWidth,
+					defaultHeight, vertexStyle);
+			graph.cellLabelChanged(nodeVertex, nodeName, true);
+			
+			if (mainConcept)
+			{
 				nodeVertex.geometry.height = mainConceptHeight; // TODO: Maybe set height according to it's width, so it's rounded?
 			}
-			if (nodeParent != defaultParent){
+			
+			if (nodeParent != defaultParent)
+			{
 				// Don't generate an edge for the first node
-				graph.insertEdge(defaultParent, null, '', nodeParent, nodeVertex, freeMindEdgeStyle);		
+				graph.insertEdge(defaultParent, null, '', nodeParent, nodeVertex, freeMindEdgeStyle);
 			}
-			cells.push(nodeVertex);			
+			
+			cells.push(nodeVertex);
 			// Insert child nodes, on correct positions
 			var childNumber = 0;
-			for (var i = 0; i < node.childNodes.length; i++){
+			
+			for (var i = 0; i < node.childNodes.length; i++)
+			{
 				var childNode = node.childNodes[i];
-				if (childNode.nodeName == "node"){
+				
+				if (childNode.nodeName == 'node')
+				{
 					var childX = x + nodeVertex.geometry.width + defaultHorizontalSpaceBetweenVertex;
 					var childY = y + (defaultHeight + defaultVerticalSpaceBetweenVertex) * childNumber;
-					childNumber += childNode.maxChilds == 0? 1 : childNode.maxChilds;
+					childNumber += childNode.maxChilds == 0 ? 1 : childNode.maxChilds;
 					processFreeMindNode(childNode, nodeVertex, childX, childY);
 				}
 			}
 		}
-		
+
 		// Makes the import one undoable edit
 		graph.getModel().beginUpdate();
 		try
 		{
 			// Gets point for free space in the graph for insert
 			var pt = graph.getFreeInsertPoint();
-			
-			var freeMindParser = new DOMParser();
-			freeMindDOM = freeMindParser.parseFromString(data, "text/xml");
-			
+			var freeMindDOM = mxUtils.parseXml(data);
 			var freeMindDOMchilds = freeMindDOM.children[0];
-			
+
 			// Transverse the childs, and generate relevant input 
-			for (var i = 0; i < freeMindDOMchilds.childNodes.length; i++){
-				if (freeMindDOMchilds.childNodes[i].nodeName == "node"){
+			for (var i = 0; i < freeMindDOMchilds.childNodes.length; i++)
+			{
+				if (freeMindDOMchilds.childNodes[i].nodeName == 'node')
+				{
 					generatePreprocessingNodeInfo(freeMindDOMchilds.childNodes[i]);
 				}
 			}
+			
 			// Generate the nodes
-			for (var i = 0; i < freeMindDOMchilds.childNodes.length; i++){
-				if (freeMindDOMchilds.childNodes[i].nodeName == "node"){
+			for (var i = 0; i < freeMindDOMchilds.childNodes.length; i++)
+			{
+				if (freeMindDOMchilds.childNodes[i].nodeName == 'node')
+				{
 					processFreeMindNode(freeMindDOMchilds.childNodes[i], defaultParent, pt.x, pt.y);
 				}
 			}
-			
+
 			// Applies current styles to new cells (might not be needed)
 			graph.fireEvent(new mxEventObject('cellsInserted', 'cells', cells));
 		}
@@ -121,13 +150,13 @@ Draw.loadPlugin(function(ui) {
 		{
 			graph.getModel().endUpdate();
 		}
-		
+
 		// Selects new cells and scrolls into view
 		graph.setSelectionCells(cells);
-       	graph.scrollCellToVisible(graph.getSelectionCell());
+		graph.scrollCellToVisible(graph.getSelectionCell());
 	};
 
-  	// Adds action
+	// Adds action
 	ui.actions.addAction('importFreemind...', function()
 	{
 		// Only modern browsers for now. We'll move the import
@@ -136,19 +165,19 @@ Draw.loadPlugin(function(ui) {
 		{
 			var input = document.createElement('input');
 			input.setAttribute('type', 'file');
-			
+
 			mxEvent.addListener(input, 'change', function()
 			{
 				if (input.files != null)
 				{
 					// Only one file for now...
 					var reader = new FileReader();
-					
+
 					reader.onload = function(e)
 					{
 						importFreemindData(e.target.result);
 					};
-					
+
 					reader.readAsText(input.files[0]);
 				}
 			});
@@ -156,14 +185,14 @@ Draw.loadPlugin(function(ui) {
 			input.click();
 		}
 	});
-	
+
 	// Adds menu
 	ui.menubar.addMenu('Import', function(menu, parent)
 	{
 		ui.menus.addMenuItem(menu, 'importFreemind');
 	});
-	
+
 	// Moves import menu to before help menu
 	ui.menubar.container.insertBefore(ui.menubar.container.lastChild,
-		ui.menubar.container.lastChild.previousSibling.previousSibling.previousSibling);
-});
+			ui.menubar.container.lastChild.previousSibling.previousSibling.previousSibling);
+});

+ 1 - 0
war/resources/dia.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_am.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_ar.txt

@@ -541,6 +541,7 @@ required=‫مطلوب‬
 reset=‫إعادة تعيين‬
 resetView=Reset View
 resize=‫تغيير الحجم‬
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=‫استرداد‬

+ 1 - 0
war/resources/dia_bg.txt

@@ -541,6 +541,7 @@ required=необходимо
 reset=Нулиране
 resetView=Преглед на нулирането
 resize=Промяна на размера
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Отзивчив
 restore=Възстановяване

+ 1 - 0
war/resources/dia_bn.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_bs.txt

@@ -541,6 +541,7 @@ required=potrebno
 reset=Resetuj
 resetView=Resetuj pregled
 resize=Izmjena veličine
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Osjetljiv
 restore=Obnoviti

+ 1 - 0
war/resources/dia_ca.txt

@@ -541,6 +541,7 @@ required=requerit
 reset=Restableix
 resetView=Restableix la vista
 resize=Ajusta la mida
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Receptiu
 restore=Recupera

+ 1 - 0
war/resources/dia_cs.txt

@@ -541,6 +541,7 @@ required=vyžadováno
 reset=Resetovat
 resetView=Resetovat pohled
 resize=Změnit rozměry
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responzivní
 restore=Obnovit

+ 1 - 0
war/resources/dia_da.txt

@@ -541,6 +541,7 @@ required=påkrævet
 reset=Nulstil
 resetView=Nulstil View
 resize=Skalér
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsiv
 restore=Genetablér

+ 1 - 0
war/resources/dia_de.txt

@@ -541,6 +541,7 @@ required=erforderlich
 reset=Zurücksetzen
 resetView=Ansicht zurücksetzen
 resize=Größe ändern
+resizeLargeImages=Möchte Sie grosse Bilder verkleinern, um die Applikation schneller zu machen?
 retina=Retina
 responsive=Responsive
 restore=Wiederherstellen

+ 1 - 0
war/resources/dia_el.txt

@@ -541,6 +541,7 @@ required=απαιτείται
 reset=Επανεκκίνηση
 resetView=Επαναφορά Προβολής
 resize=Αλλαγή μεγέθους
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Με ανταπόκριση
 restore=Επαναφορά

+ 1 - 0
war/resources/dia_eo.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_es.txt

@@ -541,6 +541,7 @@ required=requerido
 reset=Restablecer
 resetView=Restablecer vista
 resize=Redimensionar
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Receptivo
 restore=Restaurar

+ 1 - 0
war/resources/dia_et.txt

@@ -541,6 +541,7 @@ required=vajalik
 reset=Tühjenda
 resetView=Tühista erivaade
 resize=Muuda suurust
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsiivne
 restore=Taasta

+ 32 - 31
war/resources/dia_fa.txt

@@ -310,7 +310,7 @@ grid=‫شبکه‬
 gridColor=‫رنگ شبکه‬
 gridSize=‫اندازه شبکه‬
 group=‫گروه‬
-guides=Guides
+guides=‫راهنماها‬
 hateApp=‫از draw.io متنفرم‬
 heading=‫سر تیتر‬
 height=‫ارتفاع‬
@@ -321,8 +321,8 @@ hideIt=‫پنهان کردن {1}‬
 hidden=‫مخفی‬
 home=‫خانه‬
 horizontal=‫افقی‬
-horizontalFlow=Horizontal Flow
-horizontalTree=Horizontal Tree
+horizontalFlow=‫جریان افقی‬
+horizontalTree=‫درخت افقی‬
 howTranslate=‫ترجمه به زبان شما تا چه اندازه خوب است؟‬
 html=HTML
 htmlText=‫متن HTML‬
@@ -331,20 +331,20 @@ ignore=‫نادیده گرفتن‬
 image=‫تصویر‬
 imageUrl=‫URL تصویر‬
 images=‫تصاویر‬
-imagePreviewError=This image couldn't be loaded for preview. Please check the URL.
+imagePreviewError=‫این تصویر برای پیش نمایی قابل بارگذاری نیست. لطفا URL را بررسی کنید.‬
 imageTooBig=‫تصویر خیلی بزرگ است‬
 imgur=Imgur
 import=‫وارد نمودن‬
 importFrom=‫وارد نمودن از‬
-includeCopyOfMyDiagram=Include a copy of my diagram
-increaseIndent=Increase Indent
-decreaseIndent=Decrease Indent
+includeCopyOfMyDiagram=‫یک کپی از نمودار من را اضافه کن‬
+increaseIndent=‫افزایش فاصله‌ی سرسطر‬
+decreaseIndent=‫کاهش فاصله‌ی سرسطر‬
 insert=‫وارد کردن‬
 insertColumnBefore=‫وارد کردن ستون در سمت چپ‬
 insertColumnAfter=‫وارد کردن ستون در سمت راست‬
-insertEllipse=Insert Ellipse
+insertEllipse=‫وارد کردن بیضی‬
 insertImage=‫وارد کردن تصویر‬
-insertHorizontalRule=Insert Horizontal Rule
+insertHorizontalRule=‫وارد کردن قانون افقی‬
 insertLink=‫وارد کردن لینک‬
 insertPage=‫وارد کردن صفحه‬
 insertRectangle=‫وارد کردن مستطیل‬
@@ -353,7 +353,7 @@ insertRowAfter=‫وارد کردن یک ردیف در بعد‬
 insertText=‫وارد کردن متن‬
 inserting=‫وارد کردن‬
 invalidFilename=‫نامهای نمودارها نباید شامل کاراکترهای زیر باشد:  \ / | : ; { } < > & + ? = "‬
-invalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.
+invalidLicenseSeeThisPage=‫مجوز شما نامعتبر است. لطفا این بخش را ببینید <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">صفحه</a>.‬
 invalidName=‫نام نامعتبر‬
 invalidOrMissingFile=‫فایل یا غیرمعتبر است یا وجود ندارد‬
 invalidPublicUrl=‫URL عمومی غیرمعتبر است‬
@@ -363,15 +363,15 @@ italic=‫ایتالیک‬
 kennedy=Kennedy
 keyboardShortcuts=‫کلید های میانبر‬
 layers=‫لایه ها‬
-landscape=Landscape
+landscape=‫دورنما‬
 language=‫زبان‬
 leanMapping=Lean Mapping
 lastChange=‫آخرین تغییر {1) پیش‬
 lessThanAMinute=‫کمتر از یک دقیقه‬
-licensingError=Licensing Error
-licenseHasExpired=The license for {1} has expired on {2}. Click here.
-licenseWillExpire=The license for {1} will expire on {2}. Click here.
-linkAccountRequired=If the diagram is not public a Google account is required to view the link.
+licensingError=‫خطای مجوز‬
+licenseHasExpired=‫مجوز مربوط به {1} در {2} منقضی شده است. اینجا کلیک کنید. ‬
+licenseWillExpire=‫مجوز مربوط به {1} در {2} منقضی خواهد شد. اینجا کلیک کنید. ‬
+linkAccountRequired=‫اگر نمودار عمومی نیست، برای مشاهده لینک به حساب گوگل نیاز است.‬
 linkText=‫لینک متن‬
 list=‫لیست‬
 minute=‫دقیقه‬
@@ -380,11 +380,11 @@ hours=‫ساعت‬
 days=‫روز‬
 months=‫ماه‬
 years=‫سال‬
-restartForChangeRequired=Changes will take effect after page refresh.
-laneColor=Lanecolor
+restartForChangeRequired=‫تغییرات پس از رفرش کردن اعمال خواهند شد.‬
+laneColor=‫رنگ ردیف‬
 lastModified=‫آخرین اصلاح‬
 layout=Layout
-left=Left
+left=‫چپ‬
 leftAlign=‫تراز از سمت چپ‬
 leftToRight=‫چپ به راست‬
 libraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.
@@ -397,16 +397,16 @@ linewidth=‫عرض خظ‬
 link=‫پیوند‬
 links=‫لینک ها‬
 loading=‫فراخوانی‬
-lockUnlock=Lock/Unlock
-loggedOut=Logged Out
+lockUnlock=‫ققل کردن/بازکردن‬
+loggedOut=‫خارج شده‬
 logIn=‫وارد شدن‬
 loveApp=‫عاشق draw.io هستم‬
 mathematicalTypesetting=Mathematical Typesetting
-makeCopy=Make a Copy
+makeCopy=‫ایجاد یک کپی‬
 manual=‫دَستی‬
 middle=‫وسط‬
 misc=‫متفرقه‬
-mockups=Mockups
+mockups=‫ماکت ها‬
 modificationDate=‫تاریخ اصلاح‬
 modifiedBy=‫اصلاح شده توسط‬
 more=‫بیشتر‬
@@ -414,8 +414,8 @@ moreResults=‫نتایج بیشتر‬
 moreShapes=‫شکل‌های بیشتر‬
 move=‫جابحایی‬
 moveToFolder=‫جابجایی به پوشه‬
-moving=Moving
-moveSelectionTo=Move selection to {1}
+moving=‫در حال حرکت کردن‬
+moveSelectionTo=‫انتخاب را به سمت {1} انتقال دهید‬
 name=‫نام‬
 navigation=‫پیمایس‬
 networking=Networking
@@ -424,16 +424,16 @@ newLibrary=‫کتابخانه جدید‬
 nextPage=‫صفحه بعدی‬
 noAttachments=‫پیوستی یافت نشد‬
 noColor=‫بدون رنگ‬
-noFiles=No Files
+noFiles=‫فایلی وجود ندارد‬
 noFileSelected=‫فایلی انتخاب نشد‬
 noLibraries=‫کتابخانه ای یافت نشد‬
-noMoreResults=No more results
-none=None
-noOtherViewers=No other viewers
-noPlugins=No plugins
-noPreview=No preview
+noMoreResults=‫جواب دیگری وجود ندارد‬
+none=‫هیچ‬
+noOtherViewers=‫بینندگان دیگری وجود ندارد‬
+noPlugins=‫پلاگینی وجود ندارد‬
+noPreview=‫پیش نمایی وجود ندارد‬
 noResponse=‫عدم پاسخگویی سرور‬
-noResultsFor=No results for '{1}'
+noResultsFor=‫نتیجه ای برای '{1}' یافت نشد‬
 noRevisions=No revisions
 noSearchResults=‫نتیجه ای یافت نشد‬
 noPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet
@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=‫تغییر دادن اندازه‬
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=‫بازیابی کردن‬

+ 1 - 0
war/resources/dia_fi.txt

@@ -541,6 +541,7 @@ required=vaaditaan
 reset=Tyhjennä
 resetView=Nollaa zoomaus
 resize=Muuta koko
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsiivinen
 restore=Palauta

+ 1 - 0
war/resources/dia_fil.txt

@@ -541,6 +541,7 @@ required=kinakailangan
 reset=Magsimulang muli
 resetView=Ibalik sa simulang pagtanaw
 resize=Baguhin ang sukat
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Tumutugon
 restore=Ibalik sa dati

+ 1 - 0
war/resources/dia_fr.txt

@@ -541,6 +541,7 @@ required=obligatoire
 reset=Réinitialiser
 resetView=Réinitialiser la vue
 resize=Redimensionner
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Rétine
 responsive=Adapte
 restore=Récupérer

+ 1 - 0
war/resources/dia_gu.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_he.txt

@@ -541,6 +541,7 @@ required=‫נדרש‬
 reset=‫אפס ‬
 resetView=‫אפס תצוגה‬
 resize=‫שנה גודל‬
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=‫רשתית‬
 responsive=‫מגיב‬
 restore=‫שחזר‬

+ 1 - 0
war/resources/dia_hi.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_hr.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_hu.txt

@@ -541,6 +541,7 @@ required=szükséges
 reset=Újrakezd
 resetView=Nézetet visszaállít
 resize=Átméretez
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Fogékony
 restore=Visszaállít

+ 1 - 0
war/resources/dia_i18n.txt

@@ -541,6 +541,7 @@ required=required
 reset=reset
 resetView=resetView
 resize=resize
+resizeLargeImages=resizeLargeImages
 retina=retina
 responsive=responsive
 restore=restore

+ 1 - 0
war/resources/dia_id.txt

@@ -541,6 +541,7 @@ required=diperlukan
 reset=Setel Ulang
 resetView=Setel Ulang Tampilan
 resize=Ubah Ukuran
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsif
 restore=Pulihkan

+ 1 - 0
war/resources/dia_it.txt

@@ -541,6 +541,7 @@ required=richiesto
 reset=Resetta
 resetView=Resetta vista
 resize=Ridimensiona
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Reattivo
 restore=Recupera

+ 1 - 0
war/resources/dia_ja.txt

@@ -541,6 +541,7 @@ required=必須
 reset=リセット
 resetView=ビューをリセット
 resize=サイズ変更
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=網膜
 responsive=応答性
 restore=復帰する

+ 1 - 0
war/resources/dia_kn.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_ko.txt

@@ -541,6 +541,7 @@ required=필요
 reset=재설정
 resetView=뷰어 재설정
 resize=크기 조정
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=망막
 responsive=응답
 restore=복구

+ 1 - 0
war/resources/dia_lt.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_lv.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_ml.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_mr.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_ms.txt

@@ -541,6 +541,7 @@ required=diperlukan
 reset=Tetapkan semula
 resetView=Tetapkan semula Pandangan
 resize=Ubah semula saiz
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsif
 restore=Pulihkan

+ 1 - 0
war/resources/dia_nl.txt

@@ -541,6 +541,7 @@ required=vereist
 reset=Resetten
 resetView=Weergave resetten
 resize=Grootte aanpassen
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsief
 restore=Herstellen

+ 1 - 0
war/resources/dia_no.txt

@@ -541,6 +541,7 @@ required=påkrevd
 reset=Tilbakestill
 resetView=Tilbakestill visualisasjon
 resize=Endre størrelse
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsiv
 restore=Gjenopprett

+ 1 - 0
war/resources/dia_pl.txt

@@ -541,6 +541,7 @@ required=wymagany
 reset=Resetuj
 resetView=Resetuj widok
 resize=Zmień rozmiar
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsywny
 restore=Przywróć 

+ 1 - 0
war/resources/dia_pt-br.txt

@@ -541,6 +541,7 @@ required=obrigatório
 reset=Reinicializar
 resetView=Redefinir visualização
 resize=Redimensionar
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsivo
 restore=Restaurar

+ 1 - 0
war/resources/dia_pt.txt

@@ -541,6 +541,7 @@ required=obrigatório
 reset=Reiniciallizar
 resetView=Repor a visualização
 resize=Redimensionar
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsivo
 restore=Restaurar

+ 1 - 0
war/resources/dia_ro.txt

@@ -541,6 +541,7 @@ required=obligatoriu
 reset=Resetare
 resetView=Resetează perspectiva
 resize=Redimensionare
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsiv
 restore=Recuperare

+ 1 - 0
war/resources/dia_ru.txt

@@ -541,6 +541,7 @@ required=обязательно
 reset=Сбросить
 resetView=Сбросить режим просмотра
 resize=Изменить размер
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Отзывчивый
 restore=Восстановить

+ 1 - 0
war/resources/dia_sk.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_sl.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_sr.txt

@@ -541,6 +541,7 @@ required=Potreban
 reset=Reset
 resetView=Reset View
 resize=Predimenzioniranje
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Povrati

+ 1 - 0
war/resources/dia_sv.txt

@@ -541,6 +541,7 @@ required=krävd
 reset=Återställ
 resetView=Återställ synpunkt
 resize=Ändra storlek
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Flexibel 
 restore=Återställ

+ 1 - 0
war/resources/dia_sw.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_ta.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_te.txt

@@ -541,6 +541,7 @@ required=required
 reset=Reset
 resetView=Reset View
 resize=Resize
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Restore

+ 1 - 0
war/resources/dia_th.txt

@@ -541,6 +541,7 @@ required=จำเป็นต้องมี
 reset=ตั้งค่าใหม่
 resetView= รีเซ็ตมุมมอง
 resize=ปรับขนาด
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=เรติน่า
 responsive=โต้ตอบ
 restore=ฟื้นฟู

+ 1 - 0
war/resources/dia_tr.txt

@@ -541,6 +541,7 @@ required=gerekli
 reset=Sıfırla
 resetView=Görüntülemeyi sıfırla
 resize=Yeniden Boyutlandır
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Hızlı cevap veren
 restore=Eski Haline Al

+ 1 - 0
war/resources/dia_uk.txt

@@ -541,6 +541,7 @@ required=необхідно
 reset=Скинути
 resetView=Скинути режим перегляду
 resize=Змінити розмір
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Чутливий
 restore=Відновити

+ 1 - 0
war/resources/dia_vi.txt

@@ -541,6 +541,7 @@ required=cần thiết
 reset=Reset
 resetView=Reset màn hình
 resize=Đặt lại kích thước
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=Responsive
 restore=Phục hồi

+ 1 - 0
war/resources/dia_zh-tw.txt

@@ -541,6 +541,7 @@ required=必填
 reset=重置
 resetView=重置視圖
 resize=調整大小
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=響應式
 restore=復原

+ 1 - 0
war/resources/dia_zh.txt

@@ -541,6 +541,7 @@ required=必填
 reset=重置
 resetView=重置视图
 resize=调整大小
+resizeLargeImages=Do you want to resize large images to make the application run faster?
 retina=Retina
 responsive=响应式
 restore=恢复