ソースを参照

6.9.2 release

Former-commit-id: 0dcd38eae6cbfeef96a94849f34a603094d24c5a
Gaudenz Alder 8 年 前
コミット
fb9f115162

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+24-JUL-2017: 6.9.2
+
+- Add experimental support for bridges
+- Adds fixes to VSDX export
+- Minor UI fixes
+
 19-JUL-2017: 6.9.1
 
 - Adds open button for spreadsheets, videos, photos, maps in GDriveConnector

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.9.1
+6.9.2

+ 2 - 0
etc/build/build.xml

@@ -234,6 +234,7 @@
 				<file name="EditorUi.js" />
 				<file name="Settings.js" />
 				<file name="App.js" />
+				<file name="mxEdgeBridge.js" />
 				<file name="Menus.js" />
 				<file name="Pages.js" />
 			</sources>
@@ -316,6 +317,7 @@
 			
 			<sources dir="${war.dir}/js/diagramly">
 				<file name="App.js" />
+				<file name="mxEdgeBridge.js" />
 				<file name="Menus.js" />
 				<file name="Pages.js" />
 			</sources>

+ 16 - 0
src/com/mxgraph/io/mxVsdxCodec.java

@@ -168,7 +168,23 @@ public class mxVsdxCodec
 					String str = out.toString(charset);
 					if (!str.isEmpty())
 					{
+						//UTF-8 BOM causes exception while parsing, so remove it
+						//TODO is the text encoding will be correct or string must be re-read as UTF-8?
+						if (str.startsWith("")) str = str.substring(3);
+						
 						Document doc = mxXmlUtils.parseXml(str);
+						
+						if (doc == null) //An exception that is most probably due to encoding issues
+						{
+							byte[] outBytes = out.toByteArray();
+							if (outBytes[1] == 0 && outBytes[3] == 0 && outBytes[5] == 0) //UTF-16 Little Endian (has a null every other character) [Heuristic]
+							{
+								str = out.toString("UTF-16LE");
+								doc = mxXmlUtils.parseXml(str);
+							}
+							//TODO add any other non-standard encoding that may be needed 
+						}
+						
 						// Hack to be able to find the filename from an element in the XML
 						doc.setDocumentURI(filename);
 						docData.put(filename, doc);

+ 1 - 1
src/com/mxgraph/io/vsdx/Shape.java

@@ -830,7 +830,7 @@ public class Shape extends Style
 	public String getTextOpacity(String index)
 	{
 		Element colorTrans = getCellElement(mxVsdxConstants.COLOR_TRANS, index, mxVsdxConstants.CHARACTER);
-		String trans = getValue(colorTrans, "1");
+		String trans = getValue(colorTrans, "0");
 		String result = "1";
 		
 		if (trans != null && !trans.isEmpty())

+ 15 - 1
src/com/mxgraph/io/vsdx/Style.java

@@ -538,6 +538,20 @@ public class Style
 	 */
 	protected String getFillColor()
 	{
+		String fillGradientEnabled = this.getValue(this.getCellElement(mxVsdxConstants.FILL_GRADIENT_ENABLED), "0");
+		
+		if ("1".equals(fillGradientEnabled))
+		{
+			Section fillGradient = sections.get("FillGradient");
+			
+			if (fillGradient != null)
+			{
+				String color = this.getColor(fillGradient.getIndexedCell("0", "GradientStopColor"));
+				
+				if (color != null && !color.isEmpty()) return color;
+			}
+		}
+
 		String fillForeColor = this.getColor(this.getCellElement(mxVsdxConstants.FILL_FOREGND));
 		
 		if ("Themed".equals(fillForeColor))
@@ -592,7 +606,7 @@ public class Style
 
 		if (!color.startsWith("#"))
 		{
-			if (color.equals("0") || color.equals("255"))
+			if (color.equals("0") || color.equals("255") || color.isEmpty())
 			{
 				return "none";
 			}

+ 31 - 8
src/com/mxgraph/io/vsdx/VsdxShape.java

@@ -418,6 +418,12 @@ public class VsdxShape extends Shape
 		return null;
 	}
 
+	private String getIndex(Element elem)
+	{
+		String ix = elem.getAttribute("IX");
+		return ix.isEmpty()? "0" : ix;
+	}
+	
 	/**
 	 * Initialises the text labels
 	 * @param children the text Elements
@@ -441,26 +447,26 @@ public class VsdxShape extends Shape
 				case "cp":
 				{
 					Element elem = (Element) node;
-					ch = elem.getAttribute("IX");
+					ch = getIndex(elem);
 				}
 					break;
 				case "tp":
 				{
 					// TODO
 					Element elem = (Element) node;
-					elem.getAttribute("IX");
+					getIndex(elem);
 				}
 					break;
 				case "pp":
 				{
 					Element elem = (Element) node;
-					pg = elem.getAttribute("IX");
+					pg = getIndex(elem);
 				}
 					break;
 				case "fld":
 				{
 					Element elem = (Element) node;
-					fld = elem.getAttribute("IX");
+					fld = getIndex(elem);
 					break;
 				}
 				case "#text":
@@ -568,17 +574,17 @@ public class VsdxShape extends Shape
 				if (node.getNodeName().equals("cp"))
 				{
 					Element elem = (Element) node;
-					cp = elem.getAttribute("IX");
+					cp = getIndex(elem);
 				}
 				else if (node.getNodeName().equals("tp"))
 				{
 					Element elem = (Element) node;
-					tp = elem.getAttribute("IX");
+					tp = getIndex(elem);
 				}
 				else if (node.getNodeName().equals("pp"))
 				{
 					Element elem = (Element) node;
-					pp = elem.getAttribute("IX");
+					pp = getIndex(elem);
 
 					if (first)
 					{
@@ -595,7 +601,7 @@ public class VsdxShape extends Shape
 				else if (node.getNodeName().equals("fld"))
 				{
 					Element elem = (Element) node;
-					fld = elem.getAttribute("IX");
+					fld = getIndex(elem);
 
 					String text = null;
 
@@ -809,6 +815,23 @@ public class VsdxShape extends Shape
 	 */
 	private String getGradient()
 	{
+		String fillGradientEnabled = this.getValue(this.getCellElement(mxVsdxConstants.FILL_GRADIENT_ENABLED), "0");
+		
+		if ("1".equals(fillGradientEnabled))
+		{
+			Section fillGradient = sections.get("FillGradient");
+			
+			if (fillGradient != null)
+			{
+				//find the last row. We approximate gradients with first and last color
+				ArrayList<Element> rows = mxVsdxUtils.getDirectChildNamedElements(fillGradient.elem, "Row");
+				
+				String color = this.getColor(fillGradient.getIndexedCell(rows.get(rows.size() - 1).getAttribute("IX"), "GradientStopColor"));
+				
+				if (color != null && !color.isEmpty()) return color;
+			}
+		}
+
 		String gradient = "";
 		String fillPattern = this.getValue(
 				this.getCellElement(mxVsdxConstants.FILL_PATTERN), "0");

+ 14 - 1
src/com/mxgraph/io/vsdx/geometry/RowFactory.java

@@ -9,6 +9,19 @@ import com.mxgraph.io.vsdx.mxVsdxUtils;
 
 public class RowFactory 
 {
+	private static int getIndex(Element elem)
+	{
+		try
+		{
+			return Integer.parseInt(elem.getAttribute("IX"));
+		}
+		catch (Exception e)
+		{
+			//Some non-standard visio file omit the index when it is one 
+			return 1;
+		}
+	}
+	
 	private static Double getDoubleVal(String val)
 	{
 		try
@@ -28,7 +41,7 @@ public class RowFactory
 	public static Row getRowObj(Element elem, List<Row> pRows) 
 	{
 		String rowType = elem.getAttribute("T");
-		int index = Integer.parseInt(elem.getAttribute("IX"));
+		int index = getIndex(elem);
 		String del = elem.getAttribute("Del");
 		if (!del.equals("1"))
 		{

+ 1 - 0
src/com/mxgraph/io/vsdx/mxVsdxConstants.java

@@ -54,6 +54,7 @@ public class mxVsdxConstants
 	public static String FILL_FOREGND_TRANS = "FillForegndTrans";
 	public static String FILL_PATTERN = "FillPattern";
 	public static String FILL_STYLE = "FillStyle";
+	public static String FILL_GRADIENT_ENABLED = "FillGradientEnabled";
 	public static String FLAGS = "Flags";
 	public static String FLIP_X = "FlipX";
 	public static String FLIP_Y = "FlipY";

+ 15 - 2
src/com/mxgraph/io/vsdx/mxVsdxGeometry.java

@@ -18,15 +18,28 @@ public class mxVsdxGeometry {
 	
 	private ArrayList<Row> rows = null;
 	
+	private int getIndex(Element elem)
+	{
+		try
+		{
+			return Integer.parseInt(elem.getAttribute("IX"));
+		}
+		catch (Exception e)
+		{
+			//Some non-standard visio file omit the index when it is zero 
+			return 0;
+		}
+	}
+	
 	public mxVsdxGeometry(Element elem)
 	{
-		index = Integer.parseInt(elem.getAttribute("IX"));
+		index = getIndex(elem);
 		processGeoElem(elem);
 	}
 
 	public mxVsdxGeometry(Element elem, List<mxVsdxGeometry> parentGeo)
 	{
-		index = Integer.parseInt(elem.getAttribute("IX"));
+		index = getIndex(elem);
 		if (parentGeo != null && index < parentGeo.size())
 		{
 			//inherit all parent values including 

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/19/2017 03:08 PM
+# 07/24/2017 12:47 AM
 
 app.html
 index.html?offline=1

+ 5 - 1
war/electron.js

@@ -120,7 +120,11 @@ app.on('ready', e => {
 		event.returnValue = 'pong'
 	})
 	createWindow()
-	checkUpdate()
+	// checkUpdate()
+	if (!__DEV__)
+	{
+		autoUpdater.checkForUpdates()
+	}
 })
 
 // Quit when all windows are closed.

+ 2 - 2
war/index.html

@@ -375,7 +375,7 @@
 		</p>
 	</div>
 </div>
-<div id="geFooter" style="visibility:hidden;overflow:hidden;margin-right:170px;">
+<div id="geFooter" style="visibility:hidden;overflow:hidden;margin-right:200px;">
 	<div class="geSocialFooter" style="position:absolute;right:32px;white-space:nowrap;">
     	<a href="https://www.youtube.com/channel/UCiTtRN9b8P4CoSfpkfgEJHA" title="draw.io on Youtube" target="_blank">
     		<img border="0" width="24" height="24" src="images/glyphicons_youtube.png" alt="draw.io on Youtube"/>
@@ -399,7 +399,7 @@
 	</div>
 	<table align="center">
 		<tr>
-			<td id="geFooterItem2">
+			<td id="geFooterItem2" style="width:246px;">
 				<a title="Quick Start Video" href="https://www.youtube.com/watch?v=Z0D96ZikMkc" target="_blank">
 					<img border="0" align="absmiddle" style="margin-top:-3px;padding-right:8px;"
 						src="images/glyphicons_youtube_red.png"/>Quick Start Video</a>

ファイルの差分が大きいため隠しています
+ 2128 - 2493
war/js/app.min.js


ファイルの差分が大きいため隠しています
+ 126 - 127
war/js/atlas-viewer.min.js


ファイルの差分が大きいため隠しています
+ 2338 - 2703
war/js/atlas.min.js


+ 48 - 23
war/js/diagramly/App.js

@@ -748,15 +748,17 @@ App.prototype.init = function()
 	 */
 	this.basicAds = ['<a title="HTML5 JavaScript Diagramming" target="_blank" href="https://github.com/jgraph/draw.io">' +
 		'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:12px;" src="images/glyphicons_github.png"/>Fork us on GitHub</a>',
+		'<a title="' + mxResources.get('loveIt', ['draw.io']) + '" target="_blank" href="https://www.facebook.com/sharer.php?u=' + 
+		encodeURIComponent('https://www.draw.io') + '">' +
+		'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="' +
+		Editor.facebookImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>',
+		'<a title="draw.io Offline App" href="https://www.draw.io/app" target="_blank">' +
+		'<img border="0" align="absmiddle" style="margin-top:-4px;" src="images/download.png"/>&nbsp;&nbsp;draw.io Offline App</a>',
 		'<a title="' + mxResources.get('loveIt', ['draw.io']) + '" target="_blank" href="https://twitter.com/intent/tweet?text=' + 
 			encodeURIComponent(mxUtils.trim(mxResources.get('loveIt', ['']))) + '&url=' +
-			encodeURIComponent('https://www.draw.io') + '">' +
-		'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="' +
-		Editor.tweetImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>',
-		'<a title="' + mxResources.get('loveIt', ['draw.io']) + '" target="_blank" href="https://www.facebook.com/sharer.php?p[url]=' + 
-		encodeURIComponent('https://www.draw.io') + '">' +
+			encodeURIComponent('https://www.draw.io') + '&via=drawio">' +
 		'<img border="0" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="' +
-		Editor.facebookImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>'];
+		Editor.tweetImage + '"/>' + mxResources.get('loveIt', ['draw.io']) + '</a>'];
 
 	/**
 	 * Creates github client.
@@ -988,38 +990,61 @@ App.prototype.init = function()
 	
 	if (td != null)
 	{
-		this.basicAds.push(td.innerHTML);
 		this.adsHtml = this.basicAds;
 		mxUtils.setPrefixedStyle(td.style, 'transition', 'all 1s ease');
 		var lastAd = this.adsHtml.length - 1;
+		var thread = null;
 		
 		this.updateAd = function(index)
 		{
-			if (index == lastAd)
+			if (this.adsHtml.length == 0 && td.parentNode != null)
 			{
-				index = this.adsHtml.length - 1;
+				window.clearInterval(thread);
+				td.parentNode.removeChild(td);
 			}
-
-			if (index != lastAd)
+			else
 			{
-				mxUtils.setPrefixedStyle(td.style, 'transform', 'scale(0)');
-				td.style.opacity = '0';
-				lastAd = index;
-				
-				window.setTimeout(mxUtils.bind(this, function()
+				if (index == lastAd)
+				{
+					index = this.adsHtml.length - 1;
+					lastAd = null;
+				}
+
+				if (index != lastAd)
 				{
-					td.innerHTML = this.adsHtml[index];
-					mxUtils.setPrefixedStyle(td.style, 'transform', 'scale(1)');
-					td.style.opacity = '1';
-				}), 1000);
+					mxUtils.setPrefixedStyle(td.style, 'transform', 'scale(0)');
+					td.style.opacity = '0';
+					lastAd = index;
+				
+					window.setTimeout(mxUtils.bind(this, function()
+					{
+						td.innerHTML = this.adsHtml[index];
+						mxUtils.setPrefixedStyle(td.style, 'transform', 'scale(1)');
+						td.style.opacity = '1';
+					}), 1000);
+				}
 			}
 		};
 		
-		window.setInterval(mxUtils.bind(this, function()
+		thread = window.setInterval(mxUtils.bind(this, function()
 		{
-			var rnd = Math.random();
-			this.updateAd(Math.round(rnd * (this.adsHtml.length - 1)));
+			this.updateAd(Math.round(Math.random() * (this.adsHtml.length - 1)));
 		}), 180000);
+		
+		mxEvent.addListener(td, 'click', mxUtils.bind(this, function()
+		{
+			this.adsHtml.splice(lastAd, 1);
+			this.updateAd(Math.round(Math.random() * (this.adsHtml.length - 1)));
+		}));
+
+		if (mxSettings.getOpenCounter() < 3)
+		{
+			this.adsHtml.push(td.innerHTML);
+		}
+		else
+		{
+			this.updateAd(Math.round(Math.random() * (this.adsHtml.length - 1)));
+		}
 	}
 	
 	if (this.menubar != null)

+ 6 - 0
war/js/diagramly/Devel.js

@@ -106,3 +106,9 @@ mxscript(drawDevUrl + 'js/jszip/jszip.min.js');
 
 // mxRuler
 mxscript(drawDevUrl + 'js/diagramly/ruler/mxRuler.js');
+
+//Edges bridges
+if (urlParams['bridges'] == '1')
+{
+	mxscript(drawDevUrl + 'js/diagramly/mxEdgeBridge.js');
+}

+ 8 - 2
war/js/diagramly/Dialogs.js

@@ -99,7 +99,9 @@ var StorageDialog = function(editorUi, fn, rowLimit)
 	cb.setAttribute('checked', 'checked');
 	cb.defaultChecked = true;
 	var count = 0;
-	
+
+	var p3 = document.createElement('p');
+
 	function addLogo(img, title, mode, clientName, labels, clientFn)
 	{
 		var button = document.createElement('a');
@@ -225,6 +227,11 @@ var StorageDialog = function(editorUi, fn, rowLimit)
 					logo.style.visibility = '';
 					spinner.stop();
 					initButton();
+					
+					if (clientName == 'drive' && p3.parentNode != null)
+					{
+						p3.parentNode.removeChild(p3);
+					}
 				}
 			}));
 		}
@@ -390,7 +397,6 @@ var StorageDialog = function(editorUi, fn, rowLimit)
 			{
 				// To check for Disconnect plugin in chrome use mxClient.IS_GC and check for URL:
 				// chrome-extension://jeoacafpbcihiomhlakheieifhpjdfeo/scripts/vendor/jquery/jquery-2.0.3.min.map
-				var p3 = document.createElement('p');
 				p3.style.padding = '8px';
 				p3.style.fontSize = '9pt';
 				p3.style.marginTop = '-14px';

+ 13 - 3
war/js/diagramly/EditorUi.js

@@ -1337,6 +1337,16 @@
 						// ignore
 					}
 				}
+				
+				try
+				{
+					mxSettings.setOpenCounter(mxSettings.getOpenCounter() + 1);
+					mxSettings.save();
+				}
+				catch (e)
+				{
+					// ignore
+				}
 			}
 			catch (e)
 			{
@@ -2188,7 +2198,7 @@
     		}
     	}
 
-		EditorUi.prototype.footerHeight = (screen.height <= 740) ? 5 : 46;
+		EditorUi.prototype.footerHeight = (screen.width >= 780 && screen.height >= 240) ? 46 : 0;
 		
 		// Fetches footer from page
 		EditorUi.prototype.createFooter = function()
@@ -7450,7 +7460,7 @@
 												// Creates new temporary file if library is dropped in splash screen
 												if (this.getCurrentFile() == null && urlParams['embed'] != '1')
 												{
-													this.openLocalFile(this.emptyDiagramXml, name, temp);
+													this.openLocalFile(this.emptyDiagramXml, this.defaultFilename, temp);
 												}
 												
 												if (name != null && name.toLowerCase().substring(name.length - 5) == '.vssx')
@@ -7503,7 +7513,7 @@
 								// Creates new temporary file if library is dropped in splash screen
 								if (this.getCurrentFile() == null && urlParams['embed'] != '1')
 								{
-									this.openLocalFile(this.emptyDiagramXml, name, temp);
+									this.openLocalFile(this.emptyDiagramXml, this.defaultFilename, temp);
 								}
 								
 			    				try

+ 10 - 1
war/js/diagramly/Settings.js

@@ -10,7 +10,7 @@ var mxSettings =
 	/**
 	 * Defines current version of settings.
 	 */
-	currentVersion: 15,
+	currentVersion: 16,
 	
 	defaultFormatWidth: (screen.width < 600) ? '0' : '240',
 	
@@ -65,6 +65,14 @@ var mxSettings =
 	{
 		mxSettings.settings.resizeImages = resizeImages;
 	},
+	getOpenCounter: function()
+	{
+		return mxSettings.settings.openCounter;
+	},
+	setOpenCounter: function(openCounter)
+	{
+		mxSettings.settings.openCounter = openCounter;
+	},
 	getLibraries: function()
 	{
 		return mxSettings.settings.libraries;
@@ -179,6 +187,7 @@ var mxSettings =
 			gridColor: mxGraphView.prototype.gridColor,
 			autosave: true,
 			resizeImages: null,
+			openCounter: 0,
 			version: mxSettings.currentVersion,
 			// Only defined and true for new settings which haven't been saved
 			isNew: true

+ 211 - 0
war/js/diagramly/mxEdgeBridge.js

@@ -0,0 +1,211 @@
+/**
+ * Copyright (c) 2017, CTI LOGIC
+ * Copyright (c) 2006-2017, JGraph Ltd
+ * Copyright (c) 2006-2017, Gaudenz Alder
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+//TODO integrate this code in mxConnector
+mxConnector.prototype.checkLineIntersection = function (line1StartX, line1StartY, line1EndX, line1EndY,
+                              line2StartX, line2StartY, line2EndX, line2EndY)
+{
+  // if the lines intersect, the result contains the the
+  // intersection point if both line segment 1 and line segment 2 contain the point
+  // null otherwise
+  var denominator = ((line2EndY - line2StartY) * (line1EndX - line1StartX)) - ((line2EndX - line2StartX) * (line1EndY - line1StartY));
+  
+  if (denominator == 0) 
+  {
+    return null;
+  }
+  else
+  {
+    var a = line1StartY - line2StartY;
+    var b = line1StartX - line2StartX;
+    var numerator1 = ((line2EndX - line2StartX) * a) - ((line2EndY - line2StartY) * b);
+    var numerator2 = ((line1EndX - line1StartX) * a) - ((line1EndY - line1StartY) * b);
+    a = numerator1 / denominator;
+    b = numerator2 / denominator;
+
+    // if we cast these lines infinitely in both directions, they intersect here:
+    var x = line1StartX + (a * (line1EndX - line1StartX));
+    var y = line1StartY + (a * (line1EndY - line1StartY));
+
+    if (a > 0 && a < 1 &&  b > 0 && b < 1) // on both lines?
+      return new mxPoint(x, y);
+    else
+      return null;
+  }
+}
+
+//TODO Add curves support for curve edges
+//TODO Make the Bridge a curve (e.g. half a circle)
+mxConnector.prototype.mxConnectorPaintLine_orig = mxConnector.prototype.paintLine;
+mxConnector.prototype.paintLine = function(canvas, pts, rounded)
+{
+    var ptsCln = pts;
+    //TODO most probably this is not needed!
+    if (this.state == null || !this.state.cell.isEdge()) 
+    {
+	   return null;
+    }
+
+    var state = this.state;
+    var graph = state.view.graph;
+	//TODO the shift should be a configuration
+    var shift = 10; //graph.edgeBridgeSize;
+    
+    //TODO add mxGraph bridges switch 
+    if (/*graph.enableEdgeBridge &&*/ !graph.isMouseDown)
+    {
+      //during DnD we can save the extra calculations
+      var model = graph.getModel();
+      var noRedraw = state.redrawEdge;
+      ptsCln = [];
+      
+      if (state.oldIntersectIds) 
+      {
+        var ids = state.oldIntersectIds;
+        
+        for (var i = 0; i < ids.length; i++)
+        {
+            var c = model.getCell(ids[i]);
+            
+            if (c != null) 
+            {
+              var eState = graph.view.getState(c);
+              
+              if (eState != null && eState.style != null) 
+              {
+                eState.redrawEdge = true;
+                eState.shape.redraw();
+              }
+            }
+        }
+        delete state.oldIntersectIds;
+      }
+      //for each pair find the intersection
+      for (var i = 0; i < pts.length - 1; i++)
+	  {
+          var l2p1 = pts[i];
+          var l2p2 = pts[i+1];
+          ptsCln.push(l2p1);
+          var intersectPt = [];
+          
+          for (var id in model.cells)
+          {
+        	  var edge = model.cells[id];
+        	  
+        	  if (edge.isEdge() && edge != state.cell)
+        	  {
+        		  var eState = graph.view.getState(edge);
+        		  
+        		  if (eState.absolutePoints != null) 
+        		  {
+                    var eScale = eState.shape.scale;
+                    
+                    for (var j = 0; j < eState.absolutePoints.length - 1; j++)
+              	  	{
+                        var l1p1 = eState.absolutePoints[j];
+                        var l1p2 = eState.absolutePoints[j+1];
+                        //the absolute points of current edge is scaled before calling this function, so we have to scale others to get correct intersections
+                        var result = this.checkLineIntersection(l1p1.x / eScale, l1p1.y / eScale, l1p2.x / eScale, l1p2.y / eScale
+                          , l2p1.x, l2p1.y, l2p2.x, l2p2.y);
+                        
+                        if (result != null) 
+                        {
+                          var getEdgeOrder = function (edge1, edge2)
+                      	  {
+                            var p1 = edge1.getParent();
+                            var p2 = edge2.getParent();
+                            
+                            if (p1 == p2) 
+                            {
+                              return p1.getIndex(edge1) - p1.getIndex(edge2); //+ve edge1 on top, -ve edge2 on top
+                            } 
+                            else 
+                            {
+                              return 0; //not the same parent, so we cannot determine
+                            }
+                          };
+                          
+                          if (getEdgeOrder(state.cell, eState.cell) > 0) 
+                          {
+                            //instead of reordering, get the order and the top edge has the bridge
+                            var dx = result.x - l2p2.x;
+                            var dy = result.y - l2p2.y;
+                            var dist = Math.sqrt(dx * dx + dy * dy);
+                            dx /= dist;
+                            dy /= dist;
+                            
+                            var getOnLinePointAtDist = function(x1, x2, y1, y2)
+                            {
+                              var dx = x1 - x2;
+                              var dy = y1 - y2;
+                              var d = Math.sqrt(dy * dy + dx * dx);
+                              var t = shift / d;
+                              return new mxPoint((1 - t) * x1 + t * x2, (1 - t) * y1 + t * y2);
+                            }
+                            
+                            intersectPt.push(getOnLinePointAtDist(result.x, l2p1.x, result.y, l2p1.y));
+                            intersectPt.push(new mxPoint(result.x + shift * dy, result.y - shift * dx));
+                            intersectPt.push(getOnLinePointAtDist(result.x, l2p2.x, result.y, l2p2.y));
+
+                            //add others id here since here is the actual bridge!
+                            var otherId = state.cell.id;
+                            
+                            if (eState.oldIntersectIds != null) 
+                            {
+                              eState.oldIntersectIds.push(otherId);
+                            }
+                            
+                            eState.oldIntersectIds= [otherId];
+                          }
+                          else if (!noRedraw) 
+                          {
+                            eState.redrawEdge = true;
+                            eState.shape.redraw();
+                          }
+                        }
+                    }
+                  }
+        	  }
+              
+          }
+          //sort points and then add them
+          intersectPt.sort(function(p1, p2) {
+              var dx1 = p1.x - l2p1.x;
+              var dy1 = p1.y - l2p1.y;
+              var d1 = dx1 * dx1 + dy1 * dy1;
+
+              var dx2 = p2.x - l2p1.x;
+              var dy2 = p2.y - l2p1.y;
+              var d2 = dx2 * dx2 + dy2 * dy2;
+
+              return d1 - d2;
+          });
+          ptsCln.push.apply(ptsCln, intersectPt);
+          ptsCln.push(l2p2);
+      }
+      
+      if (noRedraw) 
+      {
+    	  state.redrawEdge = false;
+      }
+
+    }
+  
+    this.mxConnectorPaintLine_orig.call(this, canvas, ptsCln, rounded);
+};

ファイルの差分が大きいため隠しています
+ 181 - 2951
war/js/diagramly/sidebar/Sidebar-Bootstrap.js


ファイルの差分が大きいため隠しています
+ 189 - 2457
war/js/diagramly/sidebar/Sidebar-Sysml.js


ファイルの差分が大きいため隠しています
+ 1 - 1
war/js/embed-static.min.js


+ 3 - 3
war/js/mxgraph/EditorUi.js

@@ -931,10 +931,10 @@ EditorUi.prototype.sidebarFooterHeight = 34;
 EditorUi.prototype.editButtonLink = null;
 
 /**
- * Specifies the position of the horizontal split bar. Default is 204 or 120 for
- * screen widths <= 500px.
+ * Specifies the position of the horizontal split bar. Default is 190 or 110 for
+ * screen widths <= 640px.
  */
-EditorUi.prototype.hsplitPosition = (screen.width <= 640) ? ((screen.width <= 360) ? 62 : 116) : 208;
+EditorUi.prototype.hsplitPosition = (screen.width <= 640) ? 110 : 200;
 
 /**
  * Specifies if animations are allowed in <executeLayout>. Default is true.

ファイルの差分が大きいため隠しています
+ 1 - 1
war/js/reader.min.js


ファイルの差分が大きいため隠しています
+ 126 - 127
war/js/viewer.min.js


+ 2 - 2
war/package.json

@@ -1,6 +1,6 @@
 {
   "name": "draw.io",
-  "version": "6.8.0",
+  "version": "6.7.7",
   "description": "draw.io desktop",
   "main": "electron.js",
   "scripts": {
@@ -18,7 +18,7 @@
     "flowchart",
     "UML"
   ],
-  "author": "JGraph <support@draw.io>",
+  "author": "JGraph <sales@jgraph.com>",
   "license": "Apache-2.0",
   "bugs": {
     "url": "https://github.com/jgraph/drawio-desktop/issues"