Browse Source

6.8.1 release

Former-commit-id: cfe5c0b4f0c549e0652bc2253378604ee58db97b
Gaudenz Alder 8 years ago
parent
commit
847045559a

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+15-JUN-2017: 6.8.1
+
+- Adds page formats, uses inch units
+- Fixes logout for OneDrive picker
+- Uses mxGraph 3.7.3 beta 12
+
 14-JUN-2017: 6.8.0
 
 - Adds support for OneDrive for Business

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.8.0
+6.8.1

File diff suppressed because it is too large
+ 1 - 1
etc/mxgraph/mxClient.js


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

@@ -36,9 +36,9 @@ import com.mxgraph.io.gliffy.model.Graphic.GliffyShape;
 import com.mxgraph.io.gliffy.model.Graphic.GliffySvg;
 import com.mxgraph.model.mxCell;
 import com.mxgraph.model.mxGeometry;
+import com.mxgraph.online.Utils;
 import com.mxgraph.util.mxDomUtils;
 import com.mxgraph.util.mxPoint;
-import com.mxgraph.util.mxUtils;
 import com.mxgraph.util.mxXmlUtils;
 import com.mxgraph.view.mxGraphHeadless;
 
@@ -481,7 +481,7 @@ public class GliffyDiagramConverter
 			mxPoint pivot = new mxPoint(gliffyObject.width/ 2, gliffyObject.height / 2);
 			double cos = Math.cos(rads);
 			double sin = Math.sin(rads);
-			mxPoint baseP = mxUtils.getRotatedPoint(new mxPoint(0, 0), cos, sin, pivot);
+			mxPoint baseP = Utils.getRotatedPoint(new mxPoint(0, 0), cos, sin, pivot);
 
 			for (int i = 1; i < gliffyObject.children.size(); i++) // rest of the children are lanes
 			{
@@ -503,7 +503,7 @@ public class GliffyDiagramConverter
 				{
 					laneStyle.append("rotation=" + gliffyObject.rotation).append(";");
 					mxPoint pointAbs = new mxPoint(gLane.x, gLane.y );
-					pointAbs = mxUtils.getRotatedPoint(pointAbs, cos, sin, pivot);
+					pointAbs = Utils.getRotatedPoint(pointAbs, cos, sin, pivot);
 					childGeometry = new mxGeometry(pointAbs.getX()  - baseP.getX(), pointAbs.getY() - baseP.getY(), gLane.width, gLane.height);
 				}
 				else 

+ 18 - 0
src/com/mxgraph/online/Utils.java

@@ -17,6 +17,8 @@ import java.util.zip.Deflater;
 import java.util.zip.Inflater;
 import java.util.zip.InflaterInputStream;
 
+import com.mxgraph.util.mxPoint;
+
 /**
  * 
  * String/byte array encoding/manipulation utilities
@@ -182,4 +184,20 @@ public class Utils
 			return result;
 		}
 	}
+
+	/**
+	 * Rotates the given point by the given cos and sin.
+	 */
+	public static mxPoint getRotatedPoint(mxPoint pt, double cos, double sin,
+			mxPoint c)
+	{
+		double x = pt.getX() - c.getX();
+		double y = pt.getY() - c.getY();
+
+		double x1 = x * cos - y * sin;
+		double y1 = y * cos + x * sin;
+
+		return new mxPoint(x1 + c.getX(), y1 + c.getY());
+	}
+
 }

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 06/14/2017 01:41 PM
+# 06/15/2017 04:46 PM
 
 app.html
 index.html?offline=1

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


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


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


+ 8 - 1
war/js/diagramly/EditorUi.js

@@ -2767,7 +2767,14 @@
 				{
 					this.pickFolder(mode, mxUtils.bind(this, function(folderId)
 					{
-						this.exportFile(data, newTitle, mimeType, base64Encoded, mode, folderId);
+						try
+						{
+							this.exportFile(data, newTitle, mimeType, base64Encoded, mode, folderId);
+						}
+						catch (e)
+						{
+							this.handleError(e);
+						}
 					}));
 				}
 			}

+ 10 - 0
war/js/diagramly/OneDriveClient.js

@@ -727,6 +727,16 @@ OneDriveClient.prototype.pickFile = function(fn, returnObject)
  */
 OneDriveClient.prototype.logout = function()
 {
+	if (isLocalStorage)
+	{
+		var check = localStorage.getItem('odpickerv7cache');
+		
+		if (check != null && check.substring(0, 19) == '{"odsdkLoginHint":{')
+		{
+			localStorage.removeItem('odpickerv7cache');	
+		}
+	}
+	
 	this.clearPersistentToken();
 	this.setUser(null);
 	this.token = null;

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


+ 49 - 12
war/js/mxgraph/Editor.js

@@ -1397,16 +1397,18 @@ PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, page
 	customDiv.style.height = '24px';
 	
 	var widthInput = document.createElement('input');
-	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('size', '7');
 	widthInput.setAttribute('value', pageFormat.width);
+	widthInput.style.textAlign = 'right';
 	customDiv.appendChild(widthInput);
-	mxUtils.write(customDiv, ' x ');
+	mxUtils.write(customDiv, ' in x ');
 	
 	var heightInput = document.createElement('input');
-	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('size', '7');
 	heightInput.setAttribute('value', pageFormat.height);
+	heightInput.style.textAlign = 'right';
 	customDiv.appendChild(heightInput);
-	mxUtils.write(customDiv, ' pt');
+	mxUtils.write(customDiv, ' in');
 
 	formatDiv.style.display = 'none';
 	customDiv.style.display = 'none';
@@ -1448,6 +1450,34 @@ PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, page
 				}
 				else if (f.format != null)
 				{
+					// Fixes wrong values for previous A4 and A5 page sizes
+					if (f.key == 'a4')
+					{
+						if (pageFormat.width == 826)
+						{
+							pageFormat = mxRectangle.fromRectangle(pageFormat);
+							pageFormat.width = 827;
+						}
+						else if (pageFormat.height == 826)
+						{
+							pageFormat = mxRectangle.fromRectangle(pageFormat);
+							pageFormat.height = 827;
+						}
+					}
+					else if (f.key == 'a5')
+					{
+						if (pageFormat.width == 584)
+						{
+							pageFormat = mxRectangle.fromRectangle(pageFormat);
+							pageFormat.width = 583;
+						}
+						else if (pageFormat.height == 584)
+						{
+							pageFormat = mxRectangle.fromRectangle(pageFormat);
+							pageFormat.height = 583;
+						}
+					}
+					
 					if (pageFormat.width == f.format.width && pageFormat.height == f.format.height)
 					{
 						paperSizeSelect.value = f.key;
@@ -1476,8 +1506,8 @@ PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, page
 			// Selects custom format which is last in list
 			if (!detected)
 			{
-				widthInput.value = pageFormat.width;
-				heightInput.value = pageFormat.height;
+				widthInput.value = pageFormat.width / 100;
+				heightInput.value =pageFormat.height / 100;
 				paperSizeOption.setAttribute('selected', 'selected');
 				portraitCheckBox.setAttribute('checked', 'checked');
 				portraitCheckBox.defaultChecked = true;
@@ -1507,8 +1537,8 @@ PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, page
 		
 		if (f.format != null)
 		{
-			widthInput.value = f.format.width;
-			heightInput.value = f.format.height;
+			widthInput.value = f.format.width / 100;
+			heightInput.value = f.format.height / 100;
 			customDiv.style.display = 'none';
 			formatDiv.style.display = '';
 		}
@@ -1517,8 +1547,10 @@ PageSetupDialog.addPageFormatPanel = function(div, namePostfix, pageFormat, page
 			formatDiv.style.display = 'none';
 			customDiv.style.display = '';
 		}
-		
-		var newPageFormat = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+
+		var newPageFormat = new mxRectangle(0, 0,
+			Math.floor(parseFloat(widthInput.value) * 100),
+			Math.floor(parseFloat(heightInput.value) * 100));
 		
 		if (paperSizeSelect.value != 'custom' && landscapeCheckBox.checked)
 		{
@@ -1584,9 +1616,14 @@ PageSetupDialog.getFormats = function()
 	return [{key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
 	        {key: 'legal', title: 'US-Legal (8,5" x 14")', format: new mxRectangle(0, 0, 850, 1400)},
 	        {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
-	        {key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+	        {key: 'a0', title: 'A0 (841 mm x 1189 mm)', format: new mxRectangle(0, 0, 3300, 4681)},
+	        {key: 'a1', title: 'A1 (594 mm x 841 mm)', format: new mxRectangle(0, 0, 2339, 3300)},
+	        {key: 'a2', title: 'A2 (420 mm x 594 mm)', format: new mxRectangle(0, 0, 1654, 2336)},
+	        {key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1654)},
 	        {key: 'a4', title: 'A4 (210 mm x 297 mm)', format: mxConstants.PAGE_FORMAT_A4_PORTRAIT},
-	        {key: 'a5', title: 'A5 (148 mm x 210 mm)', format: new mxRectangle(0, 0, 584, 826)},
+	        {key: 'a5', title: 'A5 (148 mm x 210 mm)', format: new mxRectangle(0, 0, 583, 827)},
+	        {key: 'a6', title: 'A6 (105 mm x 148 mm)', format: new mxRectangle(0, 0, 413, 583)},
+	        {key: 'a7', title: 'A7 (74 mm x 105 mm)', format: new mxRectangle(0, 0, 291, 413)},
 	        {key: 'custom', title: mxResources.get('custom'), format: null}];
 };
 

+ 0 - 1
war/js/mxgraph/Format.js

@@ -4685,7 +4685,6 @@ DiagramFormatPanel.prototype.addPaperSize = function(div)
 	
 	this.addKeyHandler(accessor.widthInput, function()
 	{
-		console.log('here', graph.pageFormat);
 		accessor.set(graph.pageFormat);
 	});
 -	this.addKeyHandler(accessor.heightInput, function()

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


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


+ 0 - 2
war/open.html

@@ -60,8 +60,6 @@
 				var key = localStorage.key(i);
 				var value = localStorage.getItem(key);
 				
-				console.log('key', key, value);
-				
 				if (key.length > 0 && key.charAt(0) != '.' && value.length > 0 &&
 					(value.substring(0, 8) === '<mxfile ' ||
 					value.substring(0, 11) === '<mxlibrary>'))