Explorar el Código

8.9.3 release

Gaudenz Alder hace 7 años
padre
commit
9581961c91

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+09-JUL-2018: 8.9.3
+
+- Fixes rounded style option for containers
+- Moves webcola plugin to layout menu
+- Fixes minor errors in print preview
+- Uses mxGraph 3.9.9 beta 1
+
 06-JUL-2018: 8.9.2
 
 - Enables tags dialog in read-only files

+ 1 - 1
VERSION

@@ -1 +1 @@
-8.9.2
+8.9.3

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 11 - 9
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/06/2018 02:28 PM
+# 07/09/2018 12:12 PM
 
 app.html
 index.html?offline=1

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 622 - 620
src/main/webapp/js/app.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 577 - 575
src/main/webapp/js/atlas-viewer.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 979 - 977
src/main/webapp/js/atlas.min.js


+ 8 - 2
src/main/webapp/js/diagramly/App.js

@@ -486,6 +486,7 @@ App.main = function(callback, createUi)
 		if (urlParams['plugins'] != '0' && urlParams['offline'] != '1')
 		{
 			var plugins = mxSettings.getPlugins();
+			var pluginsLoaded = {};
 			var temp = urlParams['p'];
 			App.initPluginCallback();
 
@@ -506,8 +507,9 @@ App.main = function(callback, createUi)
 				{
 					var url = App.pluginRegistry[t[i]];
 					
-					if (url != null)
+					if (url != null && pluginsLoaded[url] == null)
 					{
+						pluginsLoaded[url] = true;
 						mxscript(drawDevUrl + url);
 					}
 					else if (window.console != null)
@@ -543,7 +545,11 @@ App.main = function(callback, createUi)
 					{
 						try
 						{
-							mxscript(plugins[i]);
+							if (pluginsLoaded[plugins[i]] == null)
+							{
+								pluginsLoaded[url] = true;
+								mxscript(plugins[i]);
+							}
 						}
 						catch (e)
 						{

+ 50 - 11
src/main/webapp/js/diagramly/Editor.js

@@ -305,6 +305,11 @@
 	  	Editor.s4() + '-' + Editor.s4() + Editor.s4() + Editor.s4();
 	};
 
+	/**
+	 * Whether foreignObjects can be used for math rendering.
+	 */
+	Editor.prototype.useForeignObjectForMath = !mxClient.IS_SF;
+
 	/**
 	 * Executes the first step for connecting to Google Drive.
 	 */
@@ -380,7 +385,7 @@
 					this.graph.setBackgroundImage(null);
 				}
 				
-				mxClient.NO_FO = ((this.graph.mathEnabled && urlParams['math-fo'] != '1') &&
+				mxClient.NO_FO = ((this.graph.mathEnabled && !this.useForeignObjectForMath) &&
 					!this.graph.useCssTransforms) ? true : this.originalNoForeignObject;
 				this.graph.setShadowVisible(node.getAttribute('shadow') == '1', false);
 			}
@@ -581,12 +586,6 @@
 	
 	/**
 	 * Overrides reset graph.
-	 * 
-	 * math-fo=1 enables foreignObjects for MathJax.
-	 * 
-	 * FIXME:
-	 * - Editor shows no math without page view
-	 * - Lightbox zooming breaks math
 	 */
 	var editorResetGraph = Editor.prototype.resetGraph;	
 	Editor.prototype.resetGraph = function()
@@ -594,9 +593,8 @@
 		this.graph.mathEnabled = (urlParams['math'] == '1');
 		this.graph.view.x0 = null;
 		this.graph.view.y0 = null;
-		mxClient.NO_FO = ((this.graph.mathEnabled && urlParams['math-fo'] != '1') &&
-			!this.graph.useCssTransforms) ? true :
-			this.originalNoForeignObject;
+		mxClient.NO_FO = ((this.graph.mathEnabled && !this.useForeignObjectForMath) &&
+			!this.graph.useCssTransforms) ? true : this.originalNoForeignObject;
 		editorResetGraph.apply(this, arguments);
 	};
 
@@ -607,7 +605,7 @@
 	Editor.prototype.updateGraphComponents = function()
 	{
 		editorUpdateGraphComponents.apply(this, arguments);
-		mxClient.NO_FO = ((this.graph.mathEnabled && urlParams['math-fo'] != '1') &&
+		mxClient.NO_FO = ((this.graph.mathEnabled && !this.useForeignObjectForMath) &&
 			!this.graph.useCssTransforms && Editor.MathJaxRender != null) ? true :
 			this.originalNoForeignObject;
 	};
@@ -1434,6 +1432,46 @@
 		return graphIsCssTransformsSupported.apply(this, arguments) && !mxClient.IS_SF;
 	};
 
+	/**
+	 * Adds workaround for math rendering in Chrome.
+	 * 
+	 * Workaround for https://bugs.webkit.org/show_bug.cgi?id=93358 in WebKit
+	 * 
+	 * Adding an absolute position DIV before the SVG seems to mitigate the problem.
+	 */
+	var graphViewValidateBackgroundPage = mxGraphView.prototype.validateBackgroundPage;
+	
+	mxGraphView.prototype.validateBackgroundPage = function()
+	{
+		graphViewValidateBackgroundPage.apply(this, arguments);
+		
+		if (mxClient.IS_GC && this.getDrawPane() != null)
+		{
+			var g = this.getDrawPane().parentNode;
+			
+			if (this.graph.mathEnabled && !mxClient.NO_FO &&
+				(this.webKitForceRepaintNode == null ||
+				this.webKitForceRepaintNode.parentNode == null) &&
+				this.graph.container.firstChild.nodeName == 'svg')
+			{
+				this.webKitForceRepaintNode = document.createElement('div');
+				this.webKitForceRepaintNode.style.cssText = 'position:absolute;';
+				g.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode, g.ownerSVGElement);
+			}
+			else if (this.webKitForceRepaintNode != null && (!this.graph.mathEnabled ||
+					(this.graph.container.firstChild.nodeName != 'svg' &&
+					this.graph.container.firstChild != this.webKitForceRepaintNode)))
+			{
+				if (this.webKitForceRepaintNode.parentNode != null)
+				{
+					this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode);
+				}
+				
+				this.webKitForceRepaintNode = null;
+			}
+		}
+	};
+	
 	/**
 	 * Sets default style (used in editor.get/setGraphXml below)
 	 */
@@ -2453,6 +2491,7 @@
 		
 				doc.writeln('<script type="text/x-mathjax-config">');
 				doc.writeln('MathJax.Hub.Config({');
+				doc.writeln('showMathMenu: false,');
 				doc.writeln('messageStyle: "none",');
 				doc.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],');
 				doc.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],');

+ 2 - 2
src/main/webapp/js/diagramly/Minimal.js

@@ -522,8 +522,8 @@ EditorUi.initMinimalTheme = function()
             {
                 this.addMenuItems(menu, (graph.isCellCollapsed(cell)) ? ['expand'] : ['collapse'], null, evt);
             }
-
-            this.addMenuItems(menu, ['lockUnlock', 'enterGroup'], null, evt);
+            
+            this.addMenuItems(menu, ['collapsible', '-', 'lockUnlock', 'enterGroup'], null, evt);
             menu.addSeparator();
             this.addSubmenu('layout', menu);
         }

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5 - 7
src/main/webapp/js/embed-static.min.js


+ 1 - 25
src/main/webapp/js/mxgraph/Graph.js

@@ -1343,32 +1343,8 @@ Graph.prototype.init = function(container)
 //							}
 //						}));
 //					}
-					// Workaround for https://bugs.webkit.org/show_bug.cgi?id=93358 in WebKit
-					// Adding an absolute position DIV before the SVG seems to mitigate the problem.
-					if (mxClient.IS_GC)
-					{
-						if (this.mathEnabled && (this.webKitForceRepaintNode == null ||
-							this.webKitForceRepaintNode.parentNode == null) &&
-							this.container.firstChild.nodeName == 'svg')
-						{
-							this.webKitForceRepaintNode = document.createElement('div');
-							this.webKitForceRepaintNode.style.cssText = 'position:absolute;';
-							g.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode, g.ownerSVGElement);
-						}
-						else if (this.webKitForceRepaintNode != null && (!this.mathEnabled ||
-								(this.container.firstChild.nodeName != 'svg' &&
-								this.container.firstChild != this.webKitForceRepaintNode)))
-						{
-							if (this.webKitForceRepaintNode.parentNode != null)
-							{
-								this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode);
-							}
-							
-							this.webKitForceRepaintNode = null;
-						}
-					}
 					// Workaround for https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4320441/
-					else if (mxClient.IS_EDGE)
+					if (mxClient.IS_EDGE)
 					{
 						// Recommended workaround is to do this on all
 						// foreignObjects, but this seems to be faster

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 5 - 7
src/main/webapp/js/reader.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 577 - 575
src/main/webapp/js/viewer.min.js


+ 2 - 2
src/main/webapp/plugins/webcola/mxWebColaAdaptor.js

@@ -372,7 +372,7 @@ mxWebColaAdaptor.prototype.graphToLayout = function(graph, movableVertices)
   {
     var cell = cells[id];
     var state = view.getState(cell);
-    if (cell.isEdge())
+    if (cell.isEdge() && cell.getTerminal(true) != null && cell.getTerminal(false) != null)
     {
       // attach edges to lowest active vertex corresponding to each of their terminals
       var terminal_id1 = inactiveToActiveMap[cell.source.id];
@@ -493,7 +493,7 @@ mxWebColaAdaptor.prototype.createLink = function(sourceId, targetId, cellIds)
   link.source = cellIds[sourceId];
   link.target = cellIds[targetId];
   link.weight = 0.9;
-  link.length = 100; // TODO: replace with Graph.prototype.defaultEdgeLength; once integrated in draw.io
+  link.length = Graph.prototype.defaultEdgeLength;
   return link;
 }
 

+ 12 - 8
src/main/webapp/plugins/webcola/webcola.js

@@ -21,16 +21,20 @@ Draw.loadPlugin(function(ui)
 		layout.execute(parent);
 	});
 	
-	var menu = ui.menus.get('extras');
-	var oldFunct = menu.funct;
+	var menu = ui.menus.get('layout');
 	
-	menu.funct = function(menu, parent)
+	if (menu != null)
 	{
-		oldFunct.apply(this, arguments);
+		var oldFunct = menu.funct;
 		
-		if (typeof window.mxWebColaLayout === 'function')
+		menu.funct = function(menu, parent)
 		{
-			ui.menus.addMenuItems(menu, ['-', 'webColaLayout'], parent);
-		}
-	};
+			oldFunct.apply(this, arguments);
+			
+			if (typeof window.mxWebColaLayout === 'function')
+			{
+				ui.menus.addMenuItems(menu, ['-', 'webColaLayout'], parent);
+			}
+		};
+	}
 });