فهرست منبع

10.5.3 release

Gaudenz Alder 6 سال پیش
والد
کامیت
49306e1369

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+21-MAR-2019: 10.5.3
+
+- Fixes timing issue in graph viewer
+- Fixes date formats in VSDX import
+- Fixes possible cropping for PDF export
+
 20-MAR-2019: 10.5.2
 
 - Fixes bug for comments in Confluence cloud

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.5.2
+10.5.3

+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/20/2019 08:08 AM
+# 03/21/2019 05:03 PM
 
 app.html
 index.html?offline=1

+ 2 - 2
src/main/webapp/export3.html

@@ -389,7 +389,7 @@
 				
 				// Gets the diagram bounds and sets the document size
 				bounds = (graph.pdfPageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
-				bounds.width = Math.ceil(bounds.width + data.border);
+				bounds.width = Math.ceil(bounds.width + data.border) + 1; //The 1 extra pixels to prevent cutting the cells on the edges when crop is enabled
 				bounds.height = Math.ceil(bounds.height + data.border);
 				
 				// Converts the graph to a vertical sequence of pages for PDF export
@@ -407,7 +407,7 @@
 			
 					// Applies print scale
 					pf = mxRectangle.fromRectangle(pf);
-					pf.width = Math.ceil(pf.width);
+					pf.width = Math.ceil(pf.width) + 1; //The 1 extra pixels to prevent cutting the cells on the right edge of the page
 					pf.height = Math.ceil(pf.height);
 					
 					// Starts at first visible page

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 6 - 6
src/main/webapp/js/app.min.js


+ 2 - 1
src/main/webapp/js/diagramly/DriveClient.js

@@ -1296,7 +1296,8 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
 										'.' + head0 + '.' + mod0, action: 'saved-' + resp.headRevisionId +
 										'.' + resp.modifiedDate, label: ((this.user != null) ?
 										this.user.id : 'unknown-user') + '.' + ((file.sync != null) ?
-										file.sync.clientId : 'nosync')});
+										(file.sync.clientId + '-chan-' + (file.sync.channelId || 'none')) :
+										'nosync')});
 								}
 								catch (e)
 								{

+ 12 - 9
src/main/webapp/js/diagramly/GraphViewer.js

@@ -208,6 +208,9 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
 				
 				this.selectPage = function(number)
 				{
+					if(this.handlingResize)
+						return;
+					
 					this.currentPage = mxUtils.mod(number, this.diagrams.length);
 					this.updateGraphXml(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(
 						this.diagrams[this.currentPage]))).documentElement);
@@ -532,18 +535,18 @@ GraphViewer.prototype.addSizeHandler = function()
 
 	var lastOffsetWidth = null;
 	var cachedOffsetWidth = null;
-	var handlingResize = false;
+	this.handlingResize = false;
 	
 	// Installs function on instance
-	this.fitGraph = function(maxScale)
+	this.fitGraph = mxUtils.bind(this, function(maxScale)
 	{
 		var cachedOffsetWidth = container.offsetWidth;
 		
 		if (cachedOffsetWidth != lastOffsetWidth)
 		{
-			if (!handlingResize)
+			if (!this.handlingResize)
 			{
-				handlingResize = true;
+				this.handlingResize = true;
 
 				this.graph.maxFitScale = (maxScale != null) ? maxScale : (this.graphConfig.zoom ||
 					((this.allowZoomIn) ? null : 1));
@@ -561,13 +564,13 @@ GraphViewer.prototype.addSizeHandler = function()
 				lastOffsetWidth = cachedOffsetWidth;
 				
 				// Workaround for fit triggering scrollbars triggering doResize (infinite loop)
-				window.setTimeout(function()
+				window.setTimeout(mxUtils.bind(this, function()
 				{
-					handlingResize = false;
-				}, 0);
+					this.handlingResize = false;
+				}), 0);
 			}
 		}
-	};
+	});
 
 	// Fallback for older browsers
 	if (GraphViewer.useResizeSensor)
@@ -608,7 +611,7 @@ GraphViewer.prototype.addSizeHandler = function()
 			{
 				window.clearTimeout(scheduledResize);
 				
-				if (!handlingResize)
+				if (!this.handlingResize)
 				{
 					scheduledResize = window.setTimeout(mxUtils.bind(this, this.fitGraph), 100);
 				}

+ 5 - 3
src/main/webapp/js/diagramly/vsdx/importer.js

@@ -8649,9 +8649,11 @@ var com;
                                                     if (position === void 0) { position = 0; }
                                                     return str.substr(position, searchString.length) === searchString;
                                                 })(format, "{{")) {
-                                                    //TODO FIXME find a date formatter (may be https://github.com/noahcooper/SimpleDateFormatJS)
-                                                	//value = new java.text.SimpleDateFormat(/* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), "")).format(new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))));
-                                                	value = new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))).toString();
+                                                	//Our date format function swaps M/m meaning
+                                                	format = format.replace(/m/g, '@').replace(/M/g, 'm').replace(/@/g, 'M');
+                                                	//Date can be in string date format or a number
+                                                	var date = isNaN(value)? new Date(value) : new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000)));
+                                                	value = Graph.prototype.formatDate(date, /* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), ""));
                                                 }
                                             }
                                             catch (e) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 15 - 15
src/main/webapp/js/extensions.min.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 218 - 217
src/main/webapp/js/viewer.min.js