Browse Source

7.3.9 release

Gaudenz Alder 8 years ago
parent
commit
2255afcc7b

+ 8 - 0
ChangeLog

@@ -1,3 +1,11 @@
+13-SEP-2017: 7.3.9
+
+- Fixes missing insert page tab
+
+12-SEP-2017: 7.3.8
+
+- Improvements to Gliffy import
+
 08-SEP-2017: 7.3.7
 
 - Uses mxGraph 3.7.6 beta 1

+ 1 - 1
VERSION

@@ -1 +1 @@
-7.3.7
+7.3.9

+ 1 - 1
src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java

@@ -295,7 +295,7 @@ public class GliffyDiagramConverter
 			}
 
 			// don't collect for swimlanes and mindmaps, their children are treated differently
-			if (object.isGroup() || (object.isLine() && object.hasChildren()))
+			if (object.isGroup() || object.isSelection() || (object.isLine() && object.hasChildren()))
 			{
 				collectVerticesAndConvert(vertices, object.children, object);
 			}

+ 46 - 6
src/com/mxgraph/io/gliffy/model/GliffyObject.java

@@ -11,6 +11,7 @@ import java.util.Set;
 import com.mxgraph.io.gliffy.importer.PostDeserializer.PostDeserializable;
 import com.mxgraph.model.mxCell;
 import com.mxgraph.model.mxGeometry;
+import com.mxgraph.online.Utils;
 
 /**
  * Class representing Gliffy diagram object
@@ -156,6 +157,7 @@ public class GliffyObject implements PostDeserializable
 		SHAPES_COORD_FIX.put("com.gliffy.shape.uml.uml_v2.deployment.node", new double[]{0, -10, 10, 10});
 		SHAPES_COORD_FIX.put("com.gliffy.shape.uml.uml_v2.deployment.device_node", new double[]{0, -10, 10, 10});
 		SHAPES_COORD_FIX.put("com.gliffy.shape.uml.uml_v2.deployment.execution_environment_node", new double[]{0, -10, 10, 10});
+		SHAPES_COORD_FIX.put("com.gliffy.shape.flowchart.flowchart_v1.default.data_storage", new double[]{0, 0, 0.115, 0});
 	}
 
 	public GliffyObject()
@@ -248,6 +250,11 @@ public class GliffyObject implements PostDeserializable
 				//Since we treat text in a different way (added as cell value instead of another child cell, this is probably the best way to detect groups when uid is null)
 				|| (uid == null && hasChildren() && !children.get(0).isText());
 	}
+	
+	public boolean isSelection() 
+	{
+		return uid.contains("default.selection");
+	}
 
 	public boolean isMindmap()
 	{
@@ -424,6 +431,35 @@ public class GliffyObject implements PostDeserializable
 				child.y += -yMin;
 		}
 	}
+
+	private mxGeometry getAdjustShifts(double[] arr, double x, double y, double w, double h)
+	{
+		double xShift = (Math.abs(arr[0]) < 1 ? w * arr[0] : arr[0]);
+		double yShift = (Math.abs(arr[1]) < 1 ? h * arr[1] : arr[1]);
+		double wShift = (Math.abs(arr[2]) < 1 ? w * arr[2] : arr[2]);
+		double hShift = (Math.abs(arr[3]) < 1 ? h * arr[3] : arr[3]);
+		
+		mxGeometry mod = new mxGeometry(x + xShift, y + yShift, w + wShift, h + hShift);
+		
+		//TODO test all possible cases!
+		if (rotation > 0)
+		{
+			mxGeometry orig = new mxGeometry(x, y, w, h);
+			
+			Utils.rotatedGeometry(orig, rotation, 0, 0);
+			Utils.rotatedGeometry(mod, rotation, 0, 0);
+			
+			xShift += mod.getX() - orig.getX();
+			yShift += mod.getY() - orig.getY();
+		}
+		
+		mod.setX(xShift);
+		mod.setY(yShift);
+		mod.setWidth(wShift);
+		mod.setHeight(hShift);
+		
+		return mod;
+	}
 	
 	public void adjustGeo(mxGeometry geo)
 	{
@@ -433,10 +469,12 @@ public class GliffyObject implements PostDeserializable
 		{
 			double x = geo.getX(), y = geo.getY(), w = geo.getWidth(), h = geo.getHeight();
 			
-			geo.setX(x + (Math.abs(arr[0]) < 1 ? w * arr[0]: arr[0]));
-			geo.setY(y + (Math.abs(arr[1]) < 1 ? h * arr[1]: arr[1]));
-			geo.setWidth(w + (Math.abs(arr[2]) < 1 ? w * arr[2]: arr[2]));
-			geo.setHeight(h + (Math.abs(arr[3]) < 1 ? h * arr[3]: arr[3]));
+			mxGeometry shifts = getAdjustShifts(arr, x, y, w, h);
+			
+			geo.setX(x + shifts.getX());
+			geo.setY(y + shifts.getY());
+			geo.setWidth(w + shifts.getWidth());
+			geo.setHeight(h + shifts.getHeight());
 		}
 	}
 
@@ -446,8 +484,10 @@ public class GliffyObject implements PostDeserializable
 		
 		if (arr != null)
 		{
-			textObject.x -= (Math.abs(arr[0]) < 1 ? width * arr[0]: arr[0]);
-			textObject.y -= (Math.abs(arr[1]) < 1 ? height * arr[1]: arr[1]);
+			mxGeometry shifts = getAdjustShifts(arr, x, y, width, height);
+			
+			textObject.x -= shifts.getX();
+			textObject.y -= shifts.getY();
 		}
 	}
 }

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 09/08/2017 09:36 AM
+# 09/13/2017 10:45 AM
 
 app.html
 index.html?offline=1

+ 1 - 1
war/index.html

@@ -401,7 +401,7 @@
 			</td>
 			<td id="geFooterItem1" align="center" style="width:282px;">
 				<a id="geFooterLink1" title="#1 Rated Confluence Add-on" target="_blank"
-					href="https://marketplace.atlassian.com/plugins/com.mxgraph.confluence.plugins.diagramly/server/overview">
+					href="https://about.draw.io/integrations/confluence-integration/">
 					<img border="0" width="24" height="24" align="absmiddle" style="padding-right:10px;"
 						src="images/logo-confluence.png"/>#1 Rated Confluence App
 				</a>

File diff suppressed because it is too large
+ 4 - 4
war/js/app.min.js


File diff suppressed because it is too large
+ 3 - 3
war/js/atlas-viewer.min.js


File diff suppressed because it is too large
+ 174 - 141
war/js/atlas.min.js


File diff suppressed because it is too large
+ 1034 - 38
war/js/diagramly/Extensions.js


+ 3 - 2
war/js/diagramly/Pages.js

@@ -942,12 +942,13 @@ EditorUi.prototype.updateTabContainer = function()
 		var insertTab = null;
 		
 		// Not chromeless and not read-only file
-		if (graph.isEnabled())
+		if (urlParams['embed'] == 1 || (this.getCurrentFile() != null &&
+			this.getCurrentFile().isEditable()))
 		{
 			insertTab = this.createPageInsertTab();
 			this.tabContainer.appendChild(insertTab);
 		}
-		
+
 		if (wrapper.clientWidth > this.tabContainer.clientWidth - btnWidth)
 		{
 			if (insertTab != null)

File diff suppressed because it is too large
+ 1 - 1
war/js/embed-static.min.js


File diff suppressed because it is too large
+ 170 - 137
war/js/extensions.min.js


File diff suppressed because it is too large
+ 1 - 1
war/js/reader.min.js


File diff suppressed because it is too large
+ 5 - 5
war/js/shapes.min.js


File diff suppressed because it is too large
+ 3 - 3
war/js/viewer.min.js


+ 0 - 1
war/shapes/bpmn/mxBpmnShape2.js

@@ -543,7 +543,6 @@ mxBpmnShape.prototype.symbols = {
 			c.lineTo(w * 0.5, 0);
 			c.lineTo(w * 0.5, h);
 			c.close();
-			c.stroke();
 			c.moveTo(w * 0.5, h * 0.5);
 			c.lineTo(w, 0);
 			c.lineTo(w, h);