浏览代码

13.4.7 release

Gaudenz Alder 5 年之前
父节点
当前提交
d01991ecd2

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+19-JUL-2020: 13.4.7
+
+- Improves target detection for blue arrows
+- Improves shape selection on touch devices
+- Uses mxGraph 4.2.1 beta 5
+
 17-JUL-2020: 13.4.6
 
 - Simplified Start Screen

+ 1 - 1
VERSION

@@ -1 +1 @@
-13.4.6
+13.4.7

文件差异内容过多而无法显示
+ 2 - 2
etc/mxgraph/mxClient.js


+ 2 - 1
src/main/webapp/images/manifest.json

@@ -6,7 +6,8 @@
         {
             "src": "/images/android-chrome-192x192.png",
             "sizes": "192x192",
-            "type": "image/png"
+            "type": "image/png",
+            "purpose": "any maskable"
         },
         {
             "src": "/images/android-chrome-512x512.png",

+ 2 - 0
src/main/webapp/index.html

@@ -250,6 +250,7 @@
 
 			var geBasePath = mxDevUrl + '/javascript/examples/grapheditor/www/js';
 			var mxBasePath = mxDevUrl + '/javascript/src';
+			var mxLoadStylesheets = navigator.appName.toUpperCase() == 'MICROSOFT INTERNET EXPLORER';
 			
 			mxscript(drawDevUrl + 'js/PreConfig.js');
 			mxscript(drawDevUrl + 'js/diagramly/Init.js');
@@ -317,6 +318,7 @@
 	<link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000">
 	<link rel="stylesheet" type="text/css" href="js/croppie/croppie.min.css">
     <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+    <link rel="stylesheet" type="text/css" href="mxgraph/css/common.css">
     <link rel="canonical" href="https://app.diagrams.net">
 	<link rel="manifest" href="images/manifest.json">
 	<link rel="shortcut icon" href="favicon.ico">

文件差异内容过多而无法显示
+ 30 - 29
src/main/webapp/js/app.min.js


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

@@ -31,8 +31,9 @@ if (!mxIsElectron && location.protocol !== 'http:')
 		var devCsp = csp.
 			// Adds script tags and loads shapes with eval
 			replace(/%script-src%/g, 'https://www.dropbox.com https://api.trello.com https://devhost.jgraph.com \'unsafe-eval\'').
-			// Loads common.css from mxgraph
+			// Adds Trello and Dropbox backend storage
 			replace(/%connect-src%/g, 'https://*.dropboxapi.com https://api.trello.com').
+			// Loads common.css from mxgraph
 			replace(/%style-src%/g, 'https://devhost.jgraph.com').
 			replace(/%frame-src%/g, '').
 			replace(/  /g, ' ');

+ 22 - 9
src/main/webapp/js/mxgraph/EditorUi.js

@@ -1176,6 +1176,14 @@ EditorUi.prototype.installShapePicker = function()
 		ui.hideShapePicker(true);
 	}));
 	
+	// Counts as popup menu
+	var popupMenuHandlerIsMenuShowing = graph.popupMenuHandler.isMenuShowing;
+	 
+	graph.popupMenuHandler.isMenuShowing = function()
+	{
+		return popupMenuHandlerIsMenuShowing.apply(this, arguments) || ui.shapePicker != null;
+	};
+	
 	// Adds dbl click dialog for inserting shapes
 	var graphDblClick = graph.dblClick;
 	
@@ -1259,7 +1267,7 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
 		var style = (source != null) ? graph.copyStyle(source) : null;
 		
 		// Do not place entry under pointer for touch devices
-		var off = 4;
+		var off = -4;
 		
 		div.className = 'geToolbarContainer geSidebarContainer geSidebar';
 		div.style.cssText = 'position:absolute;left:' + (x - off) + 'px;top:' +
@@ -1319,6 +1327,11 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
 					graph.setSelectionCell(cell);
 					graph.scrollCellToVisible(graph.getSelectionCell());
 					graph.startEditingAtCell(cell);
+					
+					if (ui.hoverIcons != null)
+					{
+						ui.hoverIcons.update(graph.view.getState(cell));
+					}
 				}
 				
 				ui.hideShapePicker();
@@ -1329,7 +1342,13 @@ EditorUi.prototype.showShapePicker = function(x, y, source, callback)
 		{
 			addCell(cells[i]);
 		}
-
+		
+		if (ui.hoverIcons != null)
+		{
+			ui.hoverIcons.reset();
+		}
+		
+		graph.popupMenuHandler.hideMenu();
 		graph.tooltipHandler.hideTooltip();
 		this.hideCurrentMenu();
 		this.hideShapePicker();
@@ -3812,13 +3831,7 @@ EditorUi.prototype.createStatusContainer = function()
 {
 	var container = document.createElement('a');
 	container.className = 'geItem geStatus';
-	
-	if (screen.width < 420)
-	{
-		container.style.maxWidth = Math.max(20, screen.width - 320) + 'px';
-		container.style.overflow = 'hidden';
-	}
-	
+
 	return container;
 };
 

+ 4 - 4
src/main/webapp/js/mxgraph/Format.js

@@ -5655,7 +5655,7 @@ DiagramStylePanel.prototype.addView = function(div)
 			delete graph.currentVertexStyle['sketch'];
 		}
 		
-		graph.updateCellStyles('sketch', (checked) ? '1' : null, graph.getCells());
+		graph.updateCellStyles('sketch', (checked) ? '1' : null, graph.getVerticesAndEdges());
 	}, null, function(div)
 	{
 		div.style.width = 'auto';
@@ -5678,7 +5678,7 @@ DiagramStylePanel.prototype.addView = function(div)
 			delete graph.currentVertexStyle['rounded'];
 		}
 		
-		graph.updateCellStyles('rounded', (checked) ? '1' : null, graph.getCells(true, false));
+		graph.updateCellStyles('rounded', (checked) ? '1' : null, graph.getVerticesAndEdges(true, false));
 	}, null, function(div)
 	{
 		div.style.width = 'auto';
@@ -5708,7 +5708,7 @@ DiagramStylePanel.prototype.addView = function(div)
 			delete graph.currentEdgeStyle['curved'];
 		}
 		
-		graph.updateCellStyles('curved', (checked) ? '1' : null, graph.getCells(false, true));
+		graph.updateCellStyles('curved', (checked) ? '1' : null, graph.getVerticesAndEdges(false, true));
 	}, null, function(div)
 	{
 		div.style.width = 'auto';
@@ -5721,7 +5721,7 @@ DiagramStylePanel.prototype.addView = function(div)
 	
 	var updateCells = mxUtils.bind(this, function(styles, graphStyle)
 	{
-		var cells = graph.getCells();
+		var cells = graph.getVerticesAndEdges();
 		
 		model.beginUpdate();
 		try

+ 5 - 3
src/main/webapp/js/mxgraph/Graph.js

@@ -1610,7 +1610,7 @@ Graph.prototype.init = function(container)
 	/**
 	 * 
 	 */
-	Graph.prototype.getCells = function(vertices, edges)
+	Graph.prototype.getVerticesAndEdges = function(vertices, edges)
 	{
 		vertices = (vertices != null) ? vertices : true;
 		edges = (edges != null) ? edges : true;
@@ -2889,7 +2889,9 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	}
 	
 	// Checks actual end point of edge for target cell
-	var target = (ignoreCellAt) ? null : this.getCellAt(dx + pt.x * s, dy + pt.y * s);
+	var rect = (!ignoreCellAt) ? new mxRectangle(dx + pt.x * s, dy + pt.y * s).grow(40) : null;
+	var tempCells = (rect != null) ? this.getCells(0, 0, 0, 0, null, null, rect) : null;
+	var target = (tempCells != null && tempCells.length > 0) ? tempCells[0] : null;
 	var keepParent = false;
 	
 	if (target != null && this.model.isAncestor(target, source))
@@ -3096,7 +3098,7 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	}
 	else
 	{
-		return execute();
+		return execute(realTarget);
 	}
 };
 

文件差异内容过多而无法显示
+ 73 - 72
src/main/webapp/js/viewer-static.min.js


文件差异内容过多而无法显示
+ 73 - 72
src/main/webapp/js/viewer.min.js


+ 3 - 3
src/main/webapp/service-worker.js

@@ -6,7 +6,7 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "4bbfa6275903074279d0da15f6cad887"
+    "revision": "4c716709a291d42bf392b525ba02e30c"
   },
   {
     "url": "js/extensions.min.js",
@@ -26,7 +26,7 @@ if (workbox)
   },
   {
     "url": "index.html",
-    "revision": "18c33f3af16a7c95000d868f1886c7b5"
+    "revision": "eeb6d984e4e11ba3f13ff25098546bb7"
   },
   {
     "url": "open.html",
@@ -294,7 +294,7 @@ if (workbox)
   },
   {
     "url": "images/manifest.json",
-    "revision": "078a1ee03d5b64100c5b760d8e73dc88"
+    "revision": "9b435c32fa220037c7296a08a4f08e13"
   },
   {
     "url": "images/logo.png",