Gaudenz Alder 6 lat temu
rodzic
commit
9feaf1e368

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+24-JUL-2019: 11.0.5
+
+- Adds timeout for Office Add-in server fallback
+- Fixes incorrect zTXt header for PNG+XML files
+- Fixes rounding of ellipse positions in SVG
+- Fixes rounding for fixed connection points
+- Uses mxGraph 3.7.5 beta 6
+
 23-JUL-2019: 11.0.4
 
 - Adds timeout handler for Google Drive thumb generation

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.0.4
+11.0.5

Plik diff jest za duży
+ 5 - 5
etc/mxgraph/mxClient.js


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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/23/2019 04:44 PM
+# 07/24/2019 02:55 PM
 
 app.html
 index.html?offline=1

Plik diff jest za duży
+ 134 - 134
src/main/webapp/js/app.min.js


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

@@ -539,7 +539,8 @@
 				{
 					var vals = value.split(String.fromCharCode(0));
 					
-					if (vals.length > 1 && vals[0] == 'mxGraphModel')
+					if (vals.length > 1 && (vals[0] == 'mxGraphModel' ||
+						vals[0] == 'mxfile'))
 					{
 						result = vals[1];
 					}

+ 29 - 8
src/main/webapp/js/diagramly/EditorUi.js

@@ -3832,7 +3832,7 @@
    	    
    	    if (xml != null)
    	    {
-   	   		data = this.writeGraphModelToPng(data, 'zTXt', 'mxGraphModel', atob(Graph.compress(xml)));
+   	    	data = this.writeGraphModelToPng(data, 'tEXt', 'mxfile', xml);
    	    }
    	    
    	    return data;
@@ -3841,10 +3841,10 @@
 	/**
 	 * 
 	 */
-	EditorUi.prototype.saveCanvas = function(canvas, xml, format)
+	EditorUi.prototype.saveCanvas = function(canvas, xml, format, ignorePageName)
 	{
 		var ext = ((format == 'jpeg') ? 'jpg' : format);
-		var filename = this.getBaseFilename() + '.' + ext;
+		var filename = this.getBaseFilename(ignorePageName) + '.' + ext;
    	    var data = this.createImageDataUri(canvas, xml, format);
    	    this.saveData(filename, ext, data.substring(data.lastIndexOf(',') + 1), 'image/' + format, true);
 	};
@@ -5897,8 +5897,8 @@
 		   			}
 		   			
 		   	   	    var data = canvas.toDataURL('image/png');
-	   	   	   		data = this.writeGraphModelToPng(data, 'zTXt', 'mxGraphModel',
-	   	   	   			atob(Graph.compress(diagramData)));
+		   	   	    data = this.writeGraphModelToPng(data,
+		   	   	    	'tEXt', 'mxfile', diagramData);
 	   	   	   		success(data.substring(data.lastIndexOf(',') + 1));
 	
 					// Removes temporary graph from DOM
@@ -6015,7 +6015,8 @@
 			   		try
 			   		{
 			   			this.saveCanvas(canvas, (editable) ? this.getFileData(true, null,
-			   				null, null, ignoreSelection, currentPage) : null, format);
+			   				null, null, ignoreSelection, currentPage) : null,
+			   				format, !currentPage);
 			   		}
 			   		catch (e)
 			   		{
@@ -6817,13 +6818,13 @@
 						ext = filename.substring(dot + 1).toUpperCase();
 					}
 					
-					EditorUi.logEvent({category: ext + '-IMPORT',
+					EditorUi.logEvent({category: ext + '-MS-IMPORT-FILE',
 						action: 'size_' + file.size,
 						label: (remote) ? 'remote' : 'local'});
 				}
 				catch (e)
 				{
-					onerror(e);
+					// ignore
 				}
 				
 				if (remote && VSD_CONVERT_URL != null) 
@@ -6988,6 +6989,16 @@
 			// Checks for signature method
 			if (typeof window.LucidImporter !== 'undefined')
 			{
+				try
+				{
+					EditorUi.logEvent({category: 'LUCIDCHART-IMPORT-FILE',
+						action: 'size_' + data.length});
+				}
+				catch (e)
+				{
+					// ignore
+				}
+				
 				try
 				{
 					success(LucidImporter.importState(JSON.parse(data)));
@@ -7995,6 +8006,16 @@
 		};
 		
 		xhr.send(formData);
+		
+		try
+		{
+			EditorUi.logEvent({category: 'GLIFFY-IMPORT-FILE',
+				action: 'size_' + file.size});
+		}
+		catch (e)
+		{
+			// ignore
+		}
 	};
 	
 	/**

Plik diff jest za duży
+ 363 - 363
src/main/webapp/js/viewer.min.js


+ 14 - 1
src/main/webapp/plugins/props.js

@@ -47,11 +47,11 @@ Draw.loadPlugin(function(ui) {
 		else
 		{
 			var attrs = (cell.value != null) ? cell.value.attributes : null;
+			highlight.highlight(graph.view.getState(cell));
 	
 			if (attrs != null)
 			{
 				var ignored = ['label', 'tooltip', 'placeholders'];
-				highlight.highlight(graph.view.getState(cell));
 				var label = graph.sanitizeHtml(graph.getLabel(cell));
 				
 				if (label != null && label.length > 0)
@@ -73,6 +73,19 @@ Draw.loadPlugin(function(ui) {
 					}
 				}
 			}
+			else
+			{
+				var label = graph.convertValueToString(cell);
+				
+				if (label != null)
+				{
+					div.innerHTML = '<h1>' + graph.sanitizeHtml(label) + '</h1>';
+				}
+				else
+				{
+					div.innerHTML = '';
+				}
+			}
 		}
 	};