瀏覽代碼

6.3.0 release

Gaudenz Alder 8 年之前
父節點
當前提交
4ba5d56940

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+11-MAR-2017: 6.3.0
+
+- Fixes slashes in branch names for GitHub client
+- Fixes order for add selected cells to library
+- Fixes order, missing shapes for export selected cells
+
 09-MAR-2017: 6.2.9
 
 - Fixes label offset for export of selected edges

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.2.9
+6.3.0

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 03/09/2017 05:50 PM
+# 03/11/2017 02:54 PM
 
 app.html
 index.html?offline=1

文件差異過大導致無法顯示
+ 36 - 36
war/js/app.min.js


文件差異過大導致無法顯示
+ 196 - 196
war/js/atlas-viewer.min.js


文件差異過大導致無法顯示
+ 18 - 18
war/js/atlas.min.js


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

@@ -1743,7 +1743,7 @@
 			
 			var addCells = mxUtils.bind(this, function(cells, bounds, evt, title)
 			{
-				cells = graph.cloneCells(graph.model.getTopmostCells(cells));
+				cells = graph.cloneCells(mxUtils.sortCells(graph.model.getTopmostCells(cells)));
 	
 				// Translates cells to origin
 				for (var i = 0; i < cells.length; i++)

+ 27 - 29
war/js/diagramly/GitHubClient.js

@@ -350,9 +350,8 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary)
 		// Should never be null
 		if (this.token != null)
 		{
-			var url = this.baseUrl + '/repos/' + org + '/' + repo +
-				'/contents/' + path + '?ref=' + encodeURIComponent(ref) +
-				'&token=' + this.token;
+			var url = this.baseUrl + '/repos/' + org + '/' + repo + '/contents/' +
+				path + '?ref=' + decodeURIComponent(ref) + '&token=' + this.token;
 			var tokens = path.split('/');
 			var name = (tokens.length > 0) ? tokens[tokens.length - 1] : path;
 	
@@ -366,7 +365,7 @@ GitHubClient.prototype.getFile = function(path, success, error, asLibrary)
 	else
 	{
 		var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
-			'/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET');
+			'/contents/' + path + '?ref=' + decodeURIComponent(ref), null, 'GET');
 		
 		this.executeRequest(req, mxUtils.bind(this, function(req)
 		{
@@ -525,6 +524,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data,
 		var entity =
 		{
 			path: path,
+			branch: decodeURIComponent(ref),
 			message: message,
 			content: data
 		};
@@ -535,8 +535,7 @@ GitHubClient.prototype.writeFile = function(org, repo, ref, path, message, data,
 		}
 		
 		var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
-			'/contents/' + path + '?ref=' + encodeURIComponent(ref),
-			JSON.stringify(entity), 'PUT');
+			'/contents/' + path, JSON.stringify(entity), 'PUT');
 		
 		this.executeRequest(req, mxUtils.bind(this, function(req)
 		{
@@ -705,7 +704,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
 
 	var dlg = new CustomDialog(this.ui, content, mxUtils.bind(this, function()
 	{
-		fn(org + '/' + repo + '/' + ref + '/' + path);
+		fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + path);
 	}));
 	this.ui.showDialog(dlg.container, 340, 270, true, true);
 	
@@ -738,7 +737,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
 		if (!hideRef)
 		{
 			mxUtils.write(pathInfo, ' / ');
-			pathInfo.appendChild(createLink(ref, mxUtils.bind(this, function()
+			pathInfo.appendChild(createLink(decodeURIComponent(ref), mxUtils.bind(this, function()
 			{
 				path = null;
 				selectRef();
@@ -778,7 +777,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
 	var selectFile = mxUtils.bind(this, function()
 	{
 		var req = new mxXmlRequest(this.baseUrl + '/repos/' + org + '/' + repo +
-				'/contents/' + path + '?ref=' + encodeURIComponent(ref), null, 'GET');
+				'/contents/' + path + '?ref=' + ref, null, 'GET');
 		dlg.okButton.removeAttribute('disabled');
 		div.innerHTML = '';
 		this.ui.spinner.spin(div, mxResources.get('loading'));
@@ -828,7 +827,7 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
 									else if (showFiles && file.type == 'file')
 									{
 										this.ui.hideDialog();
-										fn(org + '/' + repo + '/' + ref + '/' + file.path);
+										fn(org + '/' + repo + '/' + encodeURIComponent(ref) + '/' + file.path);
 									}
 								})));
 								mxUtils.br(div);
@@ -943,30 +942,29 @@ GitHubClient.prototype.showGitHubDialog = function(showFiles, fn)
 					{
 						if (value != null)
 						{
-							this.ui.spinner.spin(div, mxResources.get('loading'));
+							var tokens = value.split('/');
 							
-							this.getFile(value, mxUtils.bind(this, function(file)
+							if (tokens.length > 1 && this.ui.spinner.spin(div, mxResources.get('loading')))
 							{
-								this.ui.spinner.stop();
-								org = file.meta.org;
-								repo = file.meta.repo;
-								ref = file.meta.ref;
-
-								if (file.meta.path != null && showFiles)
-								{
-									this.ui.hideDialog();
-									fn(org + '/' + repo + '/' + ref + '/' + file.meta.path);
-								}
-								else
+								var tmpOrg = tokens[0];
+								var tmpRepo = tokens[1];
+								var tmpRef = encodeURIComponent(tokens.slice(2, tokens.length).join('/'));
+								
+								this.getFile(tmpOrg + '/' + tmpRepo + '/' + tmpRef, mxUtils.bind(this, function(file)
 								{
+									this.ui.spinner.stop();
+									org = file.meta.org;
+									repo = file.meta.repo;
+									ref = decodeURIComponent(file.meta.ref);
 									path = '';
+									
 									selectFile();
-								}
-							}), mxUtils.bind(this, function(err)
-							{
-								this.ui.spinner.stop();
-								this.ui.handleError({message: mxResources.get('fileNotFound')});
-							}));
+								}), mxUtils.bind(this, function(err)
+								{
+									this.ui.spinner.stop();
+									this.ui.handleError({message: mxResources.get('fileNotFound')});
+								}));
+							}
 						}
 					}), mxResources.get('enterValue'));
 					this.ui.showDialog(dlg.container, 300, 80, true, false);

+ 2 - 3
war/js/diagramly/GitHubFile.js

@@ -24,9 +24,8 @@ GitHubFile.prototype.getHash = function()
 		((this.meta.repo != null) ?
 			encodeURIComponent(this.meta.repo) + '/' +
 			((this.meta.ref != null) ?
-				encodeURIComponent(this.meta.ref) +
-				((this.meta.path != null) ? '/' + this.meta.path
-				: '') : '') : ''));
+				this.meta.ref + ((this.meta.path != null) ?
+					'/' + this.meta.path : '') : '') : ''));
 };
 
 /**

文件差異過大導致無法顯示
+ 8 - 8
war/js/embed-static.min.js


+ 2 - 1
war/js/mxgraph/Editor.js

@@ -492,7 +492,8 @@ Editor.prototype.getGraphXml = function(ignoreSelection)
 	}
 	else
 	{
-		node = this.graph.encodeCells(this.graph.getSelectionCells());
+		node = this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(
+			this.graph.getSelectionCells())));
 	}
 
 	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)

+ 8 - 11
war/js/mxgraph/Graph.js

@@ -4749,10 +4749,10 @@ if (typeof mxVertexHandler != 'undefined')
 		};
 		
 		/**
-		 * Function: alignCells
+		 * Function: distributeCells
 		 * 
-		 * Aligns the given cells vertically or horizontally according to the given
-		 * alignment using the optional parameter as the coordinate.
+		 * Distribuets the centers of the given cells equally along the available
+		 * horizontal or vertical space.
 		 * 
 		 * Parameters:
 		 * 
@@ -4810,20 +4810,21 @@ if (typeof mxVertexHandler != 'undefined')
 						
 						for (var i = 1; i < vertices.length - 1; i++)
 						{
+							var pstate = this.view.getState(this.model.getParent(vertices[i].cell));
 							var geo = this.getCellGeometry(vertices[i].cell);
 							t0 += dt;
 							
-							if (geo != null)
+							if (geo != null && pstate != null)
 							{
 								geo = geo.clone();
 								
 								if (horizontal)
 								{
-									geo.x = Math.round(t0 - geo.width / 2);
+									geo.x = Math.round(t0 - geo.width / 2) - pstate.origin.x;
 								}
 								else
 								{
-									geo.y = Math.round(t0 - geo.height / 2);
+									geo.y = Math.round(t0 - geo.height / 2) - pstate.origin.y;
 								}
 								
 								this.getModel().setGeometry(vertices[i].cell, geo);
@@ -4893,11 +4894,7 @@ if (typeof mxVertexHandler != 'undefined')
 			
 			for (var i = 0; i < cells.length; i++)
 			{
-				// Avoids duplicate output of children for included parents
-				if (!dict.get(this.model.getParent(cells[i])))
-				{
-					model.add(parent, clones[i]);
-				}
+				model.add(parent, clones[i]);
 			}
 
 			return codec.encode(model);

文件差異過大導致無法顯示
+ 8 - 8
war/js/reader.min.js


文件差異過大導致無法顯示
+ 206 - 206
war/js/viewer.min.js