Gaudenz Alder преди 6 години
родител
ревизия
767b3021e7

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+25-MAR-2019: 10.5.6
+
+- Adds file ID and mime type in GDriveConnector macro editor
+- Removes convert warning, cache alive check in lightbox
+- Improves handling of redirects and invalid responses
+- Removes connection arrows for edge labels
+
 25-MAR-2019: 10.5.5
 
 - Improvements for Gliffy import

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.5.5
+10.5.6

+ 23 - 12
src/main/java/com/mxgraph/online/ProxyServlet.java

@@ -94,8 +94,8 @@ public class ProxyServlet extends HttpServlet
 							.getResponseCode();
 					int counter = 0;
 
-					// Follows a maximum of 2 redirects 
-					while (counter++ < 2
+					// Follows a maximum of 6 redirects 
+					while (counter++ <= 6
 							&& (status == HttpURLConnection.HTTP_MOVED_PERM
 									|| status == HttpURLConnection.HTTP_MOVED_TEMP))
 					{
@@ -110,16 +110,27 @@ public class ProxyServlet extends HttpServlet
 								.getResponseCode();
 					}
 
-					response.setStatus(status);
-
-					// Copies input stream to output stream
-					InputStream is = connection.getInputStream();
-					byte[] head = (contentAlwaysAllowed(urlParam)) ? emptyBytes
-							: Utils.checkStreamContent(is);
-					response.setContentType("application/octet-stream");
-					String base64 = request.getParameter("base64");
-					copyResponse(is, out, head,
-							base64 != null && base64.equals("1"));
+					if (status >= 200 && status <= 299)
+					{
+						response.setStatus(status);
+						
+						// Copies input stream to output stream
+						InputStream is = connection.getInputStream();
+						byte[] head = (contentAlwaysAllowed(urlParam)) ? emptyBytes
+								: Utils.checkStreamContent(is);
+						response.setContentType("application/octet-stream");
+						String base64 = request.getParameter("base64");
+						copyResponse(is, out, head,
+								base64 != null && base64.equals("1"));
+					}
+					else
+					{
+						response.setStatus(HttpURLConnection.HTTP_PRECON_FAILED);
+					}
+				}
+				else
+				{
+					response.setStatus(HttpURLConnection.HTTP_UNSUPPORTED_TYPE);
 				}
 
 				out.flush();

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/25/2019 07:06 AM
+# 03/25/2019 08:30 PM
 
 app.html
 index.html?offline=1

Файловите разлики са ограничени, защото са твърде много
+ 24 - 23
src/main/webapp/js/app.min.js


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

@@ -1133,7 +1133,8 @@ App.prototype.init = function()
 						this.checkLicense();
 						
 						if (this.drive.user != null && (!isLocalStorage || mxSettings.settings == null ||
-							mxSettings.settings.closeRealtimeWarning == null))
+							mxSettings.settings.closeRealtimeWarning == null) &&
+							(!this.editor.chromeless || this.editor.editable))
 						{
 							this.drive.checkRealtimeFiles(mxUtils.bind(this, function()
 							{
@@ -1289,7 +1290,8 @@ App.prototype.init = function()
 			this.mode = App.mode;
 		}
 		
-		if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp)
+		if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp && urlParams['embed'] != '1' &&
+			(!this.editor.chromeless || this.editor.editable))
 		{
 			// Checks if the cache is alive
 			var acceptResponse = true;
@@ -3917,11 +3919,17 @@ App.prototype.loadFile = function(id, sameWindow, file, success, force)
 							return id;
 						};
 						
-						if (!this.fileLoaded(tempFile, true))
+						if (!this.fileLoaded(tempFile, true) && !doFallback())
 						{
-							doFallback();
+							this.handleError({message: mxResources.get('fileNotFound')},
+								mxResources.get('errorLoadingFile'));
 						}
 					}
+					else if (!doFallback())
+					{
+						this.handleError({message: mxResources.get('fileNotFound')},
+							mxResources.get('errorLoadingFile'));
+					}
 				}), mxUtils.bind(this, function()
 				{
 					if (!doFallback())

+ 11 - 0
src/main/webapp/js/mxgraph/Graph.js

@@ -2280,6 +2280,12 @@ Graph.prototype.selectCellsForConnectVertex = function(cells, evt, hoverIcons)
  */
 Graph.prototype.connectVertex = function(source, direction, length, evt, forceClone, ignoreCellAt)
 {
+	// Ignores relative edge labels
+	if (source.geometry.relative && this.model.isEdge(source.parent))
+	{
+		return [];
+	}
+	
 	ignoreCellAt = (ignoreCellAt) ? ignoreCellAt : false;
 	
 	var pt = (source.geometry.relative && source.parent.geometry != null) ?
@@ -3909,6 +3915,11 @@ HoverIcons.prototype.update = function(state, x, y)
 	}
 	else
 	{
+		if (state != null && state.cell.geometry.relative && this.graph.model.isEdge(state.cell.parent))
+		{
+			state = null;
+		}
+		
 		var timeOnTarget = null;
 		
 		// Time on target

Файловите разлики са ограничени, защото са твърде много
+ 9 - 9
src/main/webapp/js/viewer.min.js