Browse Source

10.0.18 release

Former-commit-id: 55a850dc95effb9c5468d7c6c2b318e6b13fc320
Gaudenz Alder 6 years ago
parent
commit
37ec6a6146

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+04-JAN-2019: 10.0.18
+
+- Fixes checksum errors in lightbox mode
+
 03-JAN-2019: 10.0.17
 
 - Fixes sync for PNG files in desktop app

+ 1 - 1
VERSION

@@ -1 +1 @@
-10.0.17
+10.0.18

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 01/03/2019 02:35 PM
+# 01/04/2019 11:34 AM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 29 - 28
src/main/webapp/js/app.min.js


File diff suppressed because it is too large
+ 184 - 184
src/main/webapp/js/atlas-viewer.min.js


File diff suppressed because it is too large
+ 41 - 40
src/main/webapp/js/atlas.min.js


+ 32 - 27
src/main/webapp/js/diagramly/DrawioFile.js

@@ -120,14 +120,14 @@ DrawioFile.prototype.reportEnabled = true;
  * Specifies if notify events should be ignored.
  */
 DrawioFile.prototype.stats = {
-	merges: 0, /* number of calls to merge */
 	joined: 0, /* number of join messages received */
-	reloads: 0, /* number of times the file was reloaded */
+	merged: 0, /* number of calls to merge */
+	reload: 0, /* number of times the file was reloaded */
 	checksumErrors: 0, /* number of checksum errors */
 	bytesSent: 0, /* number of bytes send in messages */
 	bytesReceived: 0, /* number of bytes received in messages */
-	msgReceived: 0, /* number of messages received */
 	msgSent: 0, /* number of messages sent */
+	msgReceived: 0, /* number of messages received */
 	cacheHits: 0, /* number of times the cache returned patches */
 	cacheMiss: 0, /* number of times we have given up to read the cache */
 	conflicts: 0, /* number of write conflicts when saving a file */
@@ -308,14 +308,9 @@ DrawioFile.prototype.getAnonymizedXmlForPages = function(pages)
 				new mxGraphModel(pages[i].root)));
 			temp.setAttribute('id', pages[i].getId());
 			
-			if (pages[i].getName() != null)
-			{
-				temp.setAttribute('name', this.ui.anonymizeString(pages[i].getName()));
-			}
-
 			if (pages[i].viewState)
 			{
-				this.ui.editor.graph.saveViewState(pages[i].viewState, temp);
+				this.ui.editor.graph.saveViewState(pages[i].viewState, temp, true);
 			}
 			
 			file.appendChild(temp);
@@ -486,7 +481,7 @@ DrawioFile.prototype.reloadFile = function(success, error)
 		
 		var fn = mxUtils.bind(this, function()
 		{
-			this.stats.reloads++;
+			this.stats.reload++;
 			this.reportEnabled = false;
 			
 			// Restores view state and current page
@@ -1243,7 +1238,7 @@ DrawioFile.prototype.addConflictStatus = function(fn, message)
 	}
 	else
 	{
-		fn()
+		this.ui.alert(mxUtils.htmlEntities(mxResources.get('fileChangedSync')), fn);
 	}
 };
 
@@ -1264,24 +1259,34 @@ DrawioFile.prototype.setConflictStatus = function(message)
  */
 DrawioFile.prototype.showRefreshDialog = function(success, error)
 {
-	// Allows for escape key to be pressed while dialog is showing
-	this.addConflictStatus(mxUtils.bind(this, function()
+	if (this.ui.editor.isChromelessView() && !this.ui.editor.editable)
 	{
-		this.showRefreshDialog(success, error);
-	}));
-	
-	this.ui.showError(mxResources.get('error') + ' (' + mxResources.get('checksum') + ')',
-		mxResources.get('fileChangedSyncDialog'),
-		mxResources.get('makeCopy'), mxUtils.bind(this, function()
-	{
-		this.copyFile(success, error);
-	}), null, mxResources.get('synchronize'), mxUtils.bind(this, function()
-	{
-		this.reloadFile(success, error);
-	}), mxResources.get('cancel'), mxUtils.bind(this, function()
+		this.ui.alert(mxResources.get('fileChangedSync'), mxUtils.bind(this, function()
+		{
+			this.reloadFile(success, error);
+		}));
+	}
+	else
 	{
-		this.ui.hideDialog();
-	}), 360, 150);
+		// Allows for escape key to be pressed while dialog is showing
+		this.addConflictStatus(mxUtils.bind(this, function()
+		{
+			this.showRefreshDialog(success, error);
+		}));
+		
+		this.ui.showError(mxResources.get('error') + ' (' + mxResources.get('checksum') + ')',
+			mxResources.get('fileChangedSyncDialog'),
+			mxResources.get('makeCopy'), mxUtils.bind(this, function()
+		{
+			this.copyFile(success, error);
+		}), null, mxResources.get('synchronize'), mxUtils.bind(this, function()
+		{
+			this.reloadFile(success, error);
+		}), mxResources.get('cancel'), mxUtils.bind(this, function()
+		{
+			this.ui.hideDialog();
+		}), 360, 150);
+	}
 };
 
 /**

+ 2 - 2
src/main/webapp/js/diagramly/DrawioFileSync.js

@@ -522,7 +522,7 @@ DrawioFileSync.prototype.installListeners = function()
 					
 					if (msg != null)
 					{
-						EditorUi.debug('Sync.message', [this], msg);
+						EditorUi.debug('Sync.message', [this], msg, data.length, 'bytes');
 
 						// Handles protocol mismatch
 						if (msg.v > DrawioFileSync.PROTOCOL)
@@ -864,7 +864,7 @@ DrawioFileSync.prototype.merge = function(patches, checksum, etag, success, erro
 
 		if (!this.file.ignorePatches(patches))
 		{
-			this.file.stats.merges++;
+			this.file.stats.merged++;
 			
 			// Patches the shadow document
 			for (var i = 0; i < patches.length; i++)

+ 21 - 15
src/main/webapp/js/diagramly/Minimal.js

@@ -1274,6 +1274,8 @@ EditorUi.initMinimalTheme = function()
         previousParent.appendChild(wrapper);
         ui.updateTabContainer();
         
+        var langMenuElt = null;
+        
         function refreshMenu()
         {
         	// Removes all existing menu items
@@ -1359,22 +1361,26 @@ EditorUi.initMinimalTheme = function()
 			if (langMenu != null && !mxClient.IS_CHROMEAPP &&
 				!EditorUi.isElectronApp && iw >= 540)
 			{
-				var elt = menuObj.addMenu('', langMenu.funct);
-				elt.setAttribute('title', mxResources.get('language'));
-				elt.className = 'geToolbarButton';
-				elt.style.backgroundImage = 'url(' + Editor.globeImage + ')';
-	        	elt.style.backgroundPosition = 'center center';
-	        	elt.style.backgroundRepeat = 'no-repeat';
-	        	elt.style.backgroundSize = '24px 24px';
-				elt.style.position = 'absolute';
-	        	elt.style.height = '24px';
-	        	elt.style.width = '24px';
-				elt.style.zIndex = '1';
-				elt.style.top = '11px';
-				elt.style.right = '14px';
-				elt.style.cursor = 'pointer';
+				if (langMenuElt == null)
+				{
+					var elt = menuObj.addMenu('', langMenu.funct);
+					elt.setAttribute('title', mxResources.get('language'));
+					elt.className = 'geToolbarButton';
+					elt.style.backgroundImage = 'url(' + Editor.globeImage + ')';
+		        	elt.style.backgroundPosition = 'center center';
+		        	elt.style.backgroundRepeat = 'no-repeat';
+		        	elt.style.backgroundSize = '24px 24px';
+					elt.style.position = 'absolute';
+		        	elt.style.height = '24px';
+		        	elt.style.width = '24px';
+					elt.style.zIndex = '1';
+					elt.style.top = '11px';
+					elt.style.right = '14px';
+					elt.style.cursor = 'pointer';
+					menubar.appendChild(elt);
+					langMenuElt = elt;
+				}
 				
-				menubar.appendChild(elt);
 				ui.buttonContainer.style.right = '40px';
 			}
 			else

+ 3 - 1
src/main/webapp/js/diagramly/Pages.js

@@ -520,9 +520,11 @@ Graph.prototype.saveViewState = function(vs, node, ignoreTransient)
 		node.setAttribute('arrows', (vs == null || vs.arrows) ? '1' : '0');
 		node.setAttribute('page', ((vs == null && this.defaultPageVisible ) ||
 			(vs != null && vs.pageVisible)) ? '1' : '0');
+		
+		// Ignores fold to avoid checksum errors for lightbox mode
+		node.setAttribute('fold', (vs == null || vs.foldingEnabled) ? '1' : '0');
 	}
 
-	node.setAttribute('fold', (vs == null || vs.foldingEnabled) ? '1' : '0');
 	node.setAttribute('pageScale', (vs != null && vs.pageScale != null) ? vs.pageScale : mxGraph.prototype.pageScale);
 	
 	var pf = (vs != null) ? vs.pageFormat : mxSettings.getPageFormat();

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


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


File diff suppressed because it is too large
+ 184 - 184
src/main/webapp/js/viewer.min.js


+ 3 - 3
src/main/webapp/plugins/random.js

@@ -363,7 +363,7 @@ Draw.loadPlugin(function(ui)
 
 					if (ui.dialog != null)
 					{
-						console.log('swapChildren halted');
+						console.log('placeChildren halted');
 					}
 					else
 					{
@@ -371,12 +371,12 @@ Draw.loadPlugin(function(ui)
 						{
 							if (counter++ < max && ui.dialog == null)
 							{
-								console.log('swapChildren', counter);
+								console.log('placeChildren', counter);
 								schedule();
 							}
 							else
 							{
-								console.log('swapChildren halted');
+								console.log('placeChildren halted');
 							}
 						});
 					}