Browse Source

6.7.2 release

Former-commit-id: 33c182f14440968e187f8fd09a053e70495b6ac8
Gaudenz Alder 8 years ago
parent
commit
4a544c57ca

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+31-MAY-2017: 6.7.2
+
+- Adds Atlassian shapes
+
 30-MAY-2017: 6.7.1
 
 - Adds viewer lightbox option in Confluence Connect

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.7.1
+6.7.2

+ 1 - 0
etc/build/build.xml

@@ -98,6 +98,7 @@
 				<file name="Sidebar-ArchiMate.js" />
 				<file name="Sidebar-ArchiMate3.js" />
 				<file name="Sidebar-Arrows2.js" />
+				<file name="Sidebar-Atlassian.js" />
 				<file name="Sidebar-AWS.js" />
 				<file name="Sidebar-AWS3.js" />
 				<file name="Sidebar-AWS3D.js" />

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

@@ -127,7 +127,7 @@ public class EllipticalArcTo extends Row
 	 * @param x3 y3 control point
 	 * @return true if the start to end angle that contains the control point is a reflex angle 
 	 */
-	private boolean isReflexAngle(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
+	protected boolean isReflexAngle(double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3)
 	{
 		x1 = x1 - x0;
 		y1 = y1 - y0;

+ 15 - 12
src/com/mxgraph/io/vsdx/geometry/RelEllipticalArcTo.java

@@ -1,24 +1,27 @@
 package com.mxgraph.io.vsdx.geometry;
 
 import com.mxgraph.io.vsdx.Shape;
+import com.mxgraph.io.vsdx.mxVsdxUtils;
 import com.mxgraph.util.mxPoint;
 
-public class RelEllipticalArcTo extends Row 
+public class RelEllipticalArcTo extends EllipticalArcTo 
 {
 	public RelEllipticalArcTo(int index, Double x, Double y, Double a, Double b, Double c, Double d) 
 	{
-		super(index, x, y);
-		this.a = a;
-		this.b = b;
-		this.c = c;
-		this.d = d;
+		super(index, x, y, a, b, c, d);
 	}
-
+	
 	@Override
-	public String handle(mxPoint p, Shape shape)
-	{
-		//TODO implement this!
-		return "";
+	public String handle(mxPoint p, Shape shape) {
+		if (this.x != null && this.y != null && this.a != null && this.b != null && this.c != null && this.d != null)
+		{
+			double h = shape.getHeight() / mxVsdxUtils.conversionFactor;
+			double w = shape.getWidth() / mxVsdxUtils.conversionFactor;
+			this.x *= w;
+			this.y *= h;
+			this.a *= w;
+			this.b *= h;
+		}
+		return super.handle(p, shape);
 	}
-
 }

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

@@ -109,7 +109,7 @@ public class RowFactory
 					return new PolylineTo(index, x, y, formulaA);
 				case "RelCubBezTo":
 					return new RelCubBezTo(index, x, y, a, b, c, d);
-				case "RelEllipticalArcTo ":
+				case "RelEllipticalArcTo":
 					return new RelEllipticalArcTo(index, x, y, a, b, c, d);
 				case "RelLineTo":
 					return new RelLineTo(index, x, y);

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 05/30/2017 11:30 AM
+# 05/31/2017 08:23 AM
 
 app.html
 index.html?offline=1

BIN
war/images/sidebar-atlassian.png


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


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


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


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

@@ -31,6 +31,7 @@ mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Android.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-ArchiMate.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-ArchiMate3.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Arrows2.js');
+mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Atlassian.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-AWS.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-AWS3.js');
 mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-AWS3D.js');

+ 1 - 0
war/js/diagramly/Editor.js

@@ -1247,6 +1247,7 @@
 	mxStencilRegistry.libraries['mockup'] = [SHAPES_PATH + '/mockup/mxMockupButtons.js'];
 	
 	mxStencilRegistry.libraries['arrows2'] = [SHAPES_PATH + '/mxArrows.js'];
+	mxStencilRegistry.libraries['atlassian'] = [STENCIL_PATH + '/atlassian.xml'];
 	mxStencilRegistry.libraries['bpmn'] = [SHAPES_PATH + '/bpmn/mxBpmnShape2.js', STENCIL_PATH + '/bpmn.xml'];
 	mxStencilRegistry.libraries['er'] = [SHAPES_PATH + '/er/mxER.js'];
 	mxStencilRegistry.libraries['ios'] = [SHAPES_PATH + '/mockup/mxMockupiOS.js'];

File diff suppressed because it is too large
+ 466 - 160
war/js/diagramly/sidebar/Sidebar-Atlassian.js


+ 3 - 0
war/js/diagramly/sidebar/Sidebar.js

@@ -135,6 +135,7 @@
            	                           {id: 'cabinets', libs: ['cabinets']},
            	                           {id: 'floorplan', libs: ['floorplan']},
            	                           {id: 'bootstrap', libs: ['bootstrap']},
+           	                           {id: 'atlassian', libs: ['atlassian']},
 	                                   {id: 'gmdl', prefix: 'gmdl', libs: Sidebar.prototype.gmdl},
            	                           {id: 'archimate3', prefix: 'archimate3', libs: Sidebar.prototype.archimate3},
            	                           {id: 'archimate', libs: ['archimate']},
@@ -329,6 +330,7 @@
             			          {title: mxResources.get('flowchart'), id: 'flowchart', image: IMAGE_PATH + '/sidebar-flowchart.png'}]},
             			{title: mxResources.get('software'),
             			entries: [{title: mxResources.get('android'), id: 'android', image: IMAGE_PATH + '/sidebar-android.png'},
+            					  {title: 'Atlassian', id: 'atlassian', image: IMAGE_PATH + '/sidebar-atlassian.png'},
             			          {title: mxResources.get('bootstrap'), id: 'bootstrap', image: IMAGE_PATH + '/sidebar-bootstrap.png'},
             			          {title: mxResources.get('entityRelation'), id: 'er', image: IMAGE_PATH + '/sidebar-er.png'},
             			          {title: mxResources.get('ios'), id: 'ios', image: IMAGE_PATH + '/sidebar-ios.png'},
@@ -928,6 +930,7 @@
 		}
 
 		this.addFloorplanPalette();
+		this.addAtlassianPalette();
 		this.addBootstrapPalette();
 
 		for (var i = 0; i < gmdl.length; i++)

+ 27 - 19
war/js/diagramly/vsdx/VsdxExport.js

@@ -40,12 +40,8 @@ function VsdxExport(editorUi, resDir)
 			    		}
 			    	}
 			    	
-			    	//var p1Id = that.VISIO_PAGES_RELS + "page1.xml.rels";
 			    	for (var i = 2; i <= pageCount; i++)
 			    	{
-			    		//var fId = that.VISIO_PAGES_RELS + "page" + i + ".xml.rels";
-			    		//zip.file(fId, files[p1Id]);
-		
 			        	var newPage = page1.cloneNode();
 			    		newPage.setAttribute(that.PART_NAME, "/visio/pages/page" + i + ".xml");
 			    		root.appendChild(newPage);
@@ -69,30 +65,42 @@ function VsdxExport(editorUi, resDir)
 		
 		try
 		{
+			//This doesn't work when pageView is off
+//			// Computes the horizontal and vertical page count
+//			var bounds = graph.getGraphBounds();
+//			var sc = graph.view.scale;
+//			var bgBounds = graph.view.getBackgroundPageBounds();
+//			
+//			var x0 = Math.round((bounds.x - bgBounds.x) / sc);
+//			var y0 = Math.round((bounds.y - bgBounds.y) / sc);
+//			
+//			var hpages = Math.max(1, Math.ceil((bounds.width / sc  + x0) / graph.pageFormat.width));
+//			var vpages = Math.max(1, Math.ceil((bounds.height / sc + y0) / graph.pageFormat.height));
+			
 			// Computes the horizontal and vertical page count
 			var bounds = graph.getGraphBounds().clone();
 			var sc = graph.view.scale;
 			var tr = graph.view.translate;
 
-			//TODO compute the empty space at the left most page and add it to width and height
-			
-			// Compute the unscaled, untranslated bounds to find
-			// the number of vertical and horizontal pages
-			bounds.width /= sc;
-			bounds.height /= sc;
-//			bounds.x /= sc;
-//			bounds.y /= sc;
-			
-//			var x0 = bounds.width - Math.abs(bounds.x - tr.x);
-//			var y0 = bounds.height - Math.abs(bounds.y - tr.y);
+			var x0 = Math.round(bounds.x / sc) - tr.x;
+			var y0 = Math.round(bounds.y / sc) - tr.y;
 			
 			// Store the available page area
 			var availableWidth = graph.pageFormat.width;
 			var availableHeight = graph.pageFormat.height;
-		
-			
-			var hpages = Math.max(1, Math.ceil((bounds.width  /*+ x0*/) / availableWidth));
-			var vpages = Math.max(1, Math.ceil((bounds.height /*+ y0*/) / availableHeight));
+
+			if (x0 < 0) 
+			{
+				x0 += Math.ceil((tr.x - bounds.x / sc) / availableWidth) * availableWidth;
+			}
+
+			if (y0 < 0) 
+			{
+				y0 += Math.ceil((tr.y - bounds.y / sc) / availableHeight) * availableHeight;
+			}
+
+			var hpages = Math.max(1, Math.ceil((bounds.width / sc  + x0) / availableWidth));
+			var vpages = Math.max(1, Math.ceil((bounds.height / sc + y0) / availableHeight));
 			
 			attr['gridEnabled'] = graph.gridEnabled;
 			attr['gridSize'] = graph.gridSize;

+ 2 - 1
war/js/diagramly/vsdx/mxVsdxCanvas2D.js

@@ -602,7 +602,8 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 		this.shape.appendChild(this.createCellElemScaled("TxtLocPinX", hw));
 		this.shape.appendChild(this.createCellElemScaled("TxtLocPinY", hh));
 
-		this.shape.appendChild(this.createCellElemScaled("TxtAngle", (360 - rotation) * Math.PI / 180));
+		if (rotation != 0)
+			this.shape.appendChild(this.createCellElemScaled("TxtAngle", (360 - rotation) * Math.PI / 180));
 		
 		var text = this.xmlDoc.createElement("Text");
 		text.textContent = str + "\n";

File diff suppressed because it is too large
+ 1 - 1
war/js/embed-static.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
+ 24 - 24
war/js/viewer.min.js