Explorar el Código

6.2.1 release

Gaudenz Alder hace 8 años
padre
commit
0c7b1fafc5
Se han modificado 8 ficheros con 132 adiciones y 134 borrados
  1. 4 0
      ChangeLog
  2. 1 1
      VERSION
  3. 1 1
      war/cache.manifest
  4. 4 4
      war/js/app.min.js
  5. 1 1
      war/js/atlas.min.js
  6. 43 49
      war/js/diagramly/DropboxClient.js
  7. 39 39
      war/js/embed-static.min.js
  8. 39 39
      war/js/reader.min.js

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+22-FEB-2017: 6.2.1
+
+- Faster read, fixes possible NPE in Dropbox
+
 22-FEB-2017: 6.2.0
 
 - Fixes encoding errors in GitHub client

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.2.0
+6.2.1

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 02/22/2017 02:03 PM
+# 02/22/2017 07:42 PM
 
 app.html
 index.html?offline=1

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 4 - 4
war/js/app.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 1
war/js/atlas.min.js


+ 43 - 49
war/js/diagramly/DropboxClient.js

@@ -236,65 +236,59 @@ DropboxClient.prototype.readFile = function(arg, success, error)
 		acceptResponse = false;
 		error({code: App.ERROR_TIMEOUT});
 	}), this.ui.timeout);
-
-	// TODO: Find catch for file does not exist in filesDownload below
-	// This will have significant impact on performance!
-	// LATER: Catch "file not found" error without metadata check?
+	
+	// Workaround for Uncaught DOMException in filesDownload is to
+	// execute a checkExists in parallel to "catch" the file not found case
 	this.checkExists(arg.path.substring(1), mxUtils.bind(this, function(checked, exists)
 	{
     	window.clearTimeout(timeoutThread);
 	    
+    	if (acceptResponse && !exists)
+    	{
+    		acceptResponse = false;
+			error({message: mxResources.get('fileNotFound')});
+    	}
+	}), true);
+	
+	// Download file in parallel
+	// LATER: Report Uncaught DOMException with path/not_found in filesDownload
+	var promise = this.client.filesDownload(arg);
+	promise.then(mxUtils.bind(this, function(response)
+	{
+    	window.clearTimeout(timeoutThread);
+	    
     	if (acceptResponse)
     	{
-			if (!exists)
+    		acceptResponse = false;
+    		
+			try
 			{
-				error({message: mxResources.get('fileNotFound')});
-			}
-			else
-			{
-	    		timeoutThread = window.setTimeout(mxUtils.bind(this, function()
-				{
-					acceptResponse = false;
-					error({code: App.ERROR_TIMEOUT});
-				}), this.ui.timeout);
-	    		
-				var promise = this.client.filesDownload(arg);
-				promise.then(mxUtils.bind(this, function(response)
-				{
-			    	window.clearTimeout(timeoutThread);
-				    
-			    	if (acceptResponse)
-			    	{
-						try
-						{
-							var reader = new FileReader();
-							
-							reader.onload = mxUtils.bind(this, function(event)
-							{
-								success(reader.result, response);
-							});
-							
-							reader.readAsText(response.fileBlob);
-						}
-						catch (e)
-						{
-							error(e);
-						}
-			    	}
-				}));
-				// Workaround for IE8/9 support with catch function
-				promise['catch'](function(err)
+				var reader = new FileReader();
+				
+				reader.onload = mxUtils.bind(this, function(event)
 				{
-			    	window.clearTimeout(timeoutThread);
-				    
-			    	if (acceptResponse)
-			    	{
-			    		error(e);
-			    	}
+					success(reader.result, response);
 				});
+				
+				reader.readAsText(response.fileBlob);
+			}
+			catch (e)
+			{
+				error(e);
 			}
     	}
-	}), true);
+	}));
+	// Workaround for IE8/9 support with catch function
+	promise['catch'](function(err)
+	{
+    	window.clearTimeout(timeoutThread);
+	    
+    	if (acceptResponse)
+    	{
+    		acceptResponse = false;
+    		error(e);
+    	}
+	});
 };
 
 /**
@@ -770,7 +764,7 @@ DropboxClient.prototype.pickFile = function(fn, readOnly)
 										{
 											this.createFile(files[0], success, error);
 										}
-									}));
+									}), error);
 								}));
 							}
 							else

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 39 - 39
war/js/embed-static.min.js


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 39 - 39
war/js/reader.min.js