Jelajahi Sumber

10.5.8 release

Former-commit-id: b6ea17ecff3ae5c207caacc739f04f2040e6e84f
Gaudenz Alder 6 tahun lalu
induk
melakukan
0c21ff9e15

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+26-MAR-2019: 10.5.8
+
+- Hides icon in Confluence cloud for resolved comments
+- Uses mxGraph 4.0.1 beta 4
+
 26-MAR-2019: 10.5.7
 
 - Adds comments in Confluence cloud viewer

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.5.7
+10.5.8

File diff ditekan karena terlalu besar
+ 2 - 2
etc/mxgraph/mxClient.js


+ 11 - 1
src/main/java/com/mxgraph/online/ProxyServlet.java

@@ -38,7 +38,13 @@ public class ProxyServlet extends HttpServlet
 	 * Buffer size for content pass-through.
 	 */
 	private static int BUFFER_SIZE = 3 * 1024;
-
+	
+	/**
+	 * GAE deadline is 30 secs so timeout before that to avoid
+	 * HardDeadlineExceeded errors.
+	 */
+	private static final int TIMEOUT = 29000;
+	
 	/**
 	 * A resuable empty byte array instance.
 	 */
@@ -74,6 +80,8 @@ public class ProxyServlet extends HttpServlet
 
 				URL url = new URL(urlParam);
 				URLConnection connection = url.openConnection();
+				connection.setConnectTimeout(TIMEOUT);
+				connection.setReadTimeout(TIMEOUT);
 				
 				response.setHeader("Cache-Control", "private, max-age=86400");
 
@@ -103,6 +111,8 @@ public class ProxyServlet extends HttpServlet
 						connection = url.openConnection();
 						((HttpURLConnection) connection)
 								.setInstanceFollowRedirects(true);
+						connection.setConnectTimeout(TIMEOUT);
+						connection.setReadTimeout(TIMEOUT);
 
 						// Workaround for 451 response from Iconfinder CDN
 						connection.setRequestProperty("User-Agent", "draw.io");

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/25/2019 10:19 PM
+# 03/26/2019 03:23 PM
 
 app.html
 index.html?offline=1

File diff ditekan karena terlalu besar
+ 82 - 82
src/main/webapp/js/app.min.js


+ 55 - 49
src/main/webapp/js/mxgraph/EditorUi.js

@@ -418,59 +418,66 @@ EditorUi = function(editor, container, lightbox)
 	// Note: Everything that is not in styles is ignored (styles is augmented below)
 	this.setDefaultStyle = function(cell)
 	{
-		var state = graph.view.getState(cell);
-		
-		if (state != null)
+		try
 		{
-			// Ignores default styles
-			var clone = cell.clone();
-			clone.style = ''
-			var defaultStyle = graph.getCellStyle(clone);
-			var values = [];
-			var keys = [];
-
-			for (var key in state.style)
+			var state = graph.view.getState(cell);
+			
+			if (state != null)
 			{
-				if (defaultStyle[key] != state.style[key])
+				// Ignores default styles
+				var clone = cell.clone();
+				clone.style = ''
+				var defaultStyle = graph.getCellStyle(clone);
+				var values = [];
+				var keys = [];
+	
+				for (var key in state.style)
 				{
-					values.push(state.style[key]);
-					keys.push(key);
+					if (defaultStyle[key] != state.style[key])
+					{
+						values.push(state.style[key]);
+						keys.push(key);
+					}
 				}
+				
+				// Handles special case for value "none"
+				var cellStyle = graph.getModel().getStyle(state.cell);
+				var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
+				
+				for (var i = 0; i < tokens.length; i++)
+				{
+					var tmp = tokens[i];
+			 		var pos = tmp.indexOf('=');
+			 					 		
+			 		if (pos >= 0)
+			 		{
+			 			var key = tmp.substring(0, pos);
+			 			var value = tmp.substring(pos + 1);
+			 			
+			 			if (defaultStyle[key] != null && value == 'none')
+			 			{
+			 				values.push(value);
+			 				keys.push(key);
+			 			}
+			 		}
+				}
+	
+				// Resets current style
+				if (graph.getModel().isEdge(state.cell))
+				{
+					graph.currentEdgeStyle = {};
+				}
+				else
+				{
+					graph.currentVertexStyle = {}
+				}
+	
+				this.fireEvent(new mxEventObject('styleChanged', 'keys', keys, 'values', values, 'cells', [state.cell]));
 			}
-			
-			// Handles special case for value "none"
-			var cellStyle = graph.getModel().getStyle(state.cell);
-			var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
-			
-			for (var i = 0; i < tokens.length; i++)
-			{
-				var tmp = tokens[i];
-		 		var pos = tmp.indexOf('=');
-		 					 		
-		 		if (pos >= 0)
-		 		{
-		 			var key = tmp.substring(0, pos);
-		 			var value = tmp.substring(pos + 1);
-		 			
-		 			if (defaultStyle[key] != null && value == 'none')
-		 			{
-		 				values.push(value);
-		 				keys.push(key);
-		 			}
-		 		}
-			}
-
-			// Resets current style
-			if (graph.getModel().isEdge(state.cell))
-			{
-				graph.currentEdgeStyle = {};
-			}
-			else
-			{
-				graph.currentVertexStyle = {}
-			}
-
-			this.fireEvent(new mxEventObject('styleChanged', 'keys', keys, 'values', values, 'cells', [state.cell]));
+		}
+		catch (e)
+		{
+			this.handleError(e);
 		}
 	};
 	
@@ -606,7 +613,6 @@ EditorUi = function(editor, container, lightbox)
 							if (!edge || mxUtils.indexOf(connectStyles, key) < 0)
 							{
 								newStyle = mxUtils.setStyle(newStyle, key, styleValue);
-								console.log('here', key, styleValue);
 							}
 						}
 					}

+ 14 - 19
src/main/webapp/js/mxgraph/Graph.js

@@ -3915,7 +3915,8 @@ HoverIcons.prototype.update = function(state, x, y)
 	}
 	else
 	{
-		if (state != null && state.cell.geometry.relative && this.graph.model.isEdge(state.cell.parent))
+		if (state != null && state.cell.geometry != null && state.cell.geometry.relative &&
+			this.graph.model.isEdge(state.cell.parent))
 		{
 			state = null;
 		}
@@ -5079,12 +5080,13 @@ if (typeof mxVertexHandler != 'undefined')
 					
 					return result;
 				}
-				else if (terminal.shape != null)
+				else if (terminal.shape != null && terminal.shape.bounds != null)
 				{
 					var dir = terminal.shape.direction;
 					var bounds = terminal.shape.bounds;
 					var scale = terminal.shape.scale;
-					var w = bounds.width / scale, h = bounds.height / scale;
+					var w = bounds.width / scale;
+					var h = bounds.height / scale;
 					
 					if (dir == mxConstants.DIRECTION_NORTH || dir == mxConstants.DIRECTION_SOUTH)
 					{
@@ -5692,23 +5694,16 @@ if (typeof mxVertexHandler != 'undefined')
 					var state = (this.model.isEdge(cell)) ? this.view.getState(cell) : null;
 					var src = mxEvent.getSource(evt);
 					
-					if (this.firstClickState == state && this.firstClickSource == src)
+					if ((this.firstClickState == state && this.firstClickSource == src) &&
+						(state == null || (state.text == null || state.text.node == null ||
+						state.text.boundingBox == null || (!mxUtils.contains(state.text.boundingBox,
+						pt.x, pt.y) && !mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt))))) &&
+						((state == null && !this.isCellLocked(this.getDefaultParent())) ||
+						(state != null && !this.isCellLocked(state.cell))) &&
+						(state != null || (mxClient.IS_VML && src == this.view.getCanvas()) ||
+						(mxClient.IS_SVG && src == this.view.getCanvas().ownerSVGElement)))
 					{
-						if (state == null || (state.text == null || state.text.node == null ||
-							(!mxUtils.contains(state.text.boundingBox, pt.x, pt.y) &&
-							!mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt)))))
-						{
-							if ((state == null && !this.isCellLocked(this.getDefaultParent())) ||
-								(state != null && !this.isCellLocked(state.cell)))
-							{
-								// Avoids accidental inserts on background
-								if (state != null || (mxClient.IS_VML && src == this.view.getCanvas()) ||
-									(mxClient.IS_SVG && src == this.view.getCanvas().ownerSVGElement))
-								{
-									cell = this.addText(pt.x, pt.y, state);
-								}
-							}
-						}
+						cell = this.addText(pt.x, pt.y, state);
 					}
 				}
 			

+ 15 - 7
src/main/webapp/js/mxgraph/Sidebar.js

@@ -740,13 +740,20 @@ Sidebar.prototype.addSearchPalette = function(expand)
 							
 							for (var i = 0; i < results.length; i++)
 							{
-								var elt = results[i]();
-								
-								// Avoids duplicates in results
-								if (hash[elt.innerHTML] == null)
+								try
+								{
+									var elt = results[i]();
+									
+									// Avoids duplicates in results
+									if (hash[elt.innerHTML] == null)
+									{
+										hash[elt.innerHTML] = '1';
+										div.appendChild(elt);
+									}
+								}
+								catch (e)
 								{
-									hash[elt.innerHTML] = '1';
-									div.appendChild(results[i]());
+									// ignore
 								}
 							}
 							
@@ -1786,7 +1793,8 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
 	var node = null;
 	
 	// For supporting HTML labels in IE9 standards mode the container is cloned instead
-	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO &&
+		this.graph.view.getCanvas().ownerSVGElement != null)
 	{
 		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
 	}

File diff ditekan karena terlalu besar
+ 236 - 236
src/main/webapp/js/viewer.min.js