浏览代码

13.4.3 release

Gaudenz Alder 5 年之前
父节点
当前提交
6500725348
共有 87 个文件被更改,包括 2127 次插入1790 次删除
  1. 4 0
      ChangeLog
  2. 1 1
      VERSION
  3. 153 100
      src/main/webapp/electron.js
  4. 25 1
      src/main/webapp/export3.html
  5. 478 469
      src/main/webapp/js/app.min.js
  6. 3 1
      src/main/webapp/js/diagramly/App.js
  7. 3 1
      src/main/webapp/js/diagramly/Dialogs.js
  8. 18 4
      src/main/webapp/js/diagramly/DrawioFile.js
  9. 1 1
      src/main/webapp/js/diagramly/DrawioFileSync.js
  10. 25 19
      src/main/webapp/js/diagramly/DriveFile.js
  11. 5 0
      src/main/webapp/js/diagramly/Editor.js
  12. 7 6
      src/main/webapp/js/diagramly/EditorUi.js
  13. 3 3
      src/main/webapp/js/diagramly/Extensions.js
  14. 13 0
      src/main/webapp/js/diagramly/GitHubFile.js
  15. 13 0
      src/main/webapp/js/diagramly/GitLabFile.js
  16. 11 4
      src/main/webapp/js/diagramly/Menus.js
  17. 62 0
      src/main/webapp/js/diagramly/OneDriveFile.js
  18. 1 1
      src/main/webapp/js/diagramly/sidebar/Sidebar-MSCAE.js
  19. 246 245
      src/main/webapp/js/extensions.min.js
  20. 50 51
      src/main/webapp/js/mxgraph/EditorUi.js
  21. 7 7
      src/main/webapp/js/mxgraph/Format.js
  22. 97 87
      src/main/webapp/js/mxgraph/Graph.js
  23. 9 5
      src/main/webapp/js/mxgraph/Shapes.js
  24. 1 1
      src/main/webapp/js/mxgraph/Sidebar.js
  25. 364 360
      src/main/webapp/js/viewer-static.min.js
  26. 364 360
      src/main/webapp/js/viewer.min.js
  27. 1 0
      src/main/webapp/resources/dia.txt
  28. 1 0
      src/main/webapp/resources/dia_am.txt
  29. 1 0
      src/main/webapp/resources/dia_ar.txt
  30. 1 0
      src/main/webapp/resources/dia_bg.txt
  31. 1 0
      src/main/webapp/resources/dia_bn.txt
  32. 1 0
      src/main/webapp/resources/dia_bs.txt
  33. 1 0
      src/main/webapp/resources/dia_ca.txt
  34. 1 0
      src/main/webapp/resources/dia_cs.txt
  35. 1 0
      src/main/webapp/resources/dia_da.txt
  36. 1 0
      src/main/webapp/resources/dia_de.txt
  37. 1 0
      src/main/webapp/resources/dia_el.txt
  38. 1 0
      src/main/webapp/resources/dia_eo.txt
  39. 1 0
      src/main/webapp/resources/dia_es.txt
  40. 1 0
      src/main/webapp/resources/dia_et.txt
  41. 1 0
      src/main/webapp/resources/dia_eu.txt
  42. 1 0
      src/main/webapp/resources/dia_fa.txt
  43. 1 0
      src/main/webapp/resources/dia_fi.txt
  44. 1 0
      src/main/webapp/resources/dia_fil.txt
  45. 1 0
      src/main/webapp/resources/dia_fr.txt
  46. 1 0
      src/main/webapp/resources/dia_gl.txt
  47. 1 0
      src/main/webapp/resources/dia_gu.txt
  48. 1 0
      src/main/webapp/resources/dia_he.txt
  49. 1 0
      src/main/webapp/resources/dia_hi.txt
  50. 1 0
      src/main/webapp/resources/dia_hr.txt
  51. 1 0
      src/main/webapp/resources/dia_hu.txt
  52. 1 0
      src/main/webapp/resources/dia_i18n.txt
  53. 1 0
      src/main/webapp/resources/dia_id.txt
  54. 1 0
      src/main/webapp/resources/dia_it.txt
  55. 1 0
      src/main/webapp/resources/dia_ja.txt
  56. 1 0
      src/main/webapp/resources/dia_kn.txt
  57. 1 0
      src/main/webapp/resources/dia_ko.txt
  58. 1 0
      src/main/webapp/resources/dia_lt.txt
  59. 1 0
      src/main/webapp/resources/dia_lv.txt
  60. 1 0
      src/main/webapp/resources/dia_ml.txt
  61. 1 0
      src/main/webapp/resources/dia_mr.txt
  62. 1 0
      src/main/webapp/resources/dia_ms.txt
  63. 1 0
      src/main/webapp/resources/dia_my.txt
  64. 1 0
      src/main/webapp/resources/dia_nl.txt
  65. 1 0
      src/main/webapp/resources/dia_no.txt
  66. 1 0
      src/main/webapp/resources/dia_pl.txt
  67. 1 0
      src/main/webapp/resources/dia_pt-br.txt
  68. 1 0
      src/main/webapp/resources/dia_pt.txt
  69. 1 0
      src/main/webapp/resources/dia_ro.txt
  70. 1 0
      src/main/webapp/resources/dia_ru.txt
  71. 1 0
      src/main/webapp/resources/dia_si.txt
  72. 1 0
      src/main/webapp/resources/dia_sk.txt
  73. 1 0
      src/main/webapp/resources/dia_sl.txt
  74. 1 0
      src/main/webapp/resources/dia_sr.txt
  75. 1 0
      src/main/webapp/resources/dia_sv.txt
  76. 1 0
      src/main/webapp/resources/dia_sw.txt
  77. 1 0
      src/main/webapp/resources/dia_ta.txt
  78. 1 0
      src/main/webapp/resources/dia_te.txt
  79. 1 0
      src/main/webapp/resources/dia_th.txt
  80. 1 0
      src/main/webapp/resources/dia_tr.txt
  81. 1 0
      src/main/webapp/resources/dia_uk.txt
  82. 1 0
      src/main/webapp/resources/dia_vi.txt
  83. 1 0
      src/main/webapp/resources/dia_zh-tw.txt
  84. 1 0
      src/main/webapp/resources/dia_zh.txt
  85. 60 60
      src/main/webapp/service-worker.js
  86. 13 3
      src/main/webapp/styles/grapheditor.css
  87. 32 0
      src/main/webapp/vsdxImporter.html

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+14-JUL-2020: 13.4.3
+
+- Adds shape selection on blue arrow click
+
 10-JUL-2020: 13.4.2
 
 - Adds shape selection on double click

+ 1 - 1
VERSION

@@ -1 +1 @@
-13.4.2
+13.4.3

+ 153 - 100
src/main/webapp/electron.js

@@ -188,7 +188,7 @@ app.on('ready', e =>
         argv.unshift(null)
     }
 
-	var validFormatRegExp = /^(pdf|svg|png|jpeg|jpg|vsdx)$/;
+	var validFormatRegExp = /^(pdf|svg|png|jpeg|jpg|vsdx|xml)$/;
 	
 	function argsRange(val) 
 	{
@@ -207,7 +207,7 @@ app.on('ready', e =>
 	        .option('-r, --recursive', 'for a folder input, recursively convert all files in sub-folders also')
 	        .option('-o, --output <output file/folder>', 'specify the output file/folder. If omitted, the input file name is used for output with the specified format as extension')
 	        .option('-f, --format <format>',
-			    'if output file name extension is specified, this option is ignored (file type is determined from output extension, possible export formats are pdf, png, jpg, svg, vsdx)',
+			    'if output file name extension is specified, this option is ignored (file type is determined from output extension, possible export formats are pdf, png, jpg, svg, vsdx, and xml)',
 			    validFormatRegExp, 'pdf')
 			.option('-q, --quality <quality>',
 				'output image quality for JPEG (default: 90)', parseInt)
@@ -231,6 +231,8 @@ app.on('ready', e =>
 				'selects a specific page, if not specified and the format is an image, the first page is selected', parseInt)
 			.option('-g, --page-range <from>..<to>',
 				'selects a page range (for PDF format only)', argsRange)
+			.option('-u, --uncompressed',
+				'Uncompressed XML output (for XML format only)')
 	        .parse(argv)
 	}
 	catch(e)
@@ -243,7 +245,10 @@ app.on('ready', e =>
     if (program.export)
 	{
     	var dummyWin = new BrowserWindow({
-			show : false
+			show : false,
+			webPreferences: {
+				nodeIntegration: true
+			}
 		});
     	
     	windowsRegistry.push(dummyWin);
@@ -299,7 +304,7 @@ app.on('ready', e =>
 	    		from = program.pageRage[0] >= 0 ? program.pageRage[0] : null;
 	    		to = program.pageRage[1] >= 0 ? program.pageRage[1] : null;
 			}
-	    	
+
 			var expArgs = {
 				format: format,
 				w: program.width > 0 ? program.width : null,
@@ -311,7 +316,8 @@ app.on('ready', e =>
 				allPages: format == 'pdf' && program.allPages,
 				scale: (program.crop && program.scale == null) ? 1.00001: (program.scale || 1), //any value other than 1 crops the pdf
 				embedXml: program.embedDiagram? '1' : '0',
-				jpegQuality: program.quality
+				jpegQuality: program.quality,
+				uncompressed: program.uncompressed
 			};
 
 			var paths = program.args;
@@ -371,113 +377,138 @@ app.on('ready', e =>
 						{
 							var ext = path.extname(curFile);
 							
-							expArgs.xml = fs.readFileSync(curFile, ext === '.png'? null : 'utf-8');
+							expArgs.xml = fs.readFileSync(curFile, ext === '.png' || ext === '.vsdx' ? null : 'utf-8');
 							
 							if (ext === '.png')
 							{
 								expArgs.xml = Buffer.from(expArgs.xml).toString('base64');
+								startExport();
+							}
+							else if (ext === '.vsdx')
+							{
+								dummyWin.loadURL(`file://${__dirname}/vsdxImporter.html`);
+								
+								const contents = dummyWin.webContents;
+
+								contents.on('did-finish-load', function()
+							    {
+									contents.send('import', expArgs.xml);
+
+									ipcMain.once('import-success', function(evt, xml)
+						    	    {
+										expArgs.xml = xml;
+										startExport();
+						    	    });
+						    	    
+						    	    ipcMain.once('import-error', function()
+						    	    {
+						    	    	console.error('Error: cannot import VSDX file: ' + curFile);
+						    	    	next();
+						    	    });
+							    });
+							}
+							else
+							{
+								startExport();
 							}
 							
-							var mockEvent = {
-								reply: function(msg, data)
+							function next()
+							{
+								fileIndex++;
+								
+								if (fileIndex < files.length)
+								{
+									processOneFile();
+								}
+								else
 								{
-									try
+									cmdQPressed = true;
+									dummyWin.destroy();
+								}
+							};
+							
+							function startExport()
+							{
+								var mockEvent = {
+									reply: function(msg, data)
 									{
-										if (data == null || data.length == 0)
-										{
-											console.error('Error: Export failed: ' + curFile);
-										}
-										else if (msg == 'export-success')
+										try
 										{
-											var outFileName = null;
-											
-											if (outType != null)
+											if (data == null || data.length == 0)
+											{
+												console.error('Error: Export failed: ' + curFile);
+											}
+											else if (msg == 'export-success')
 											{
-												if (outType.isDir)
+												var outFileName = null;
+												
+												if (outType != null)
 												{
-													outFileName = path.join(program.output, path.basename(curFile)) + '.' + format;
+													if (outType.isDir)
+													{
+														outFileName = path.join(program.output, path.basename(curFile)) + '.' + format;
+													}
+													else
+													{
+														outFileName = program.output;
+													}
 												}
-												else
+												else if (inStat.isFile())
 												{
-													outFileName = program.output;
+													outFileName = path.join(path.dirname(paths[0]), path.basename(paths[0],
+														path.extname(paths[0]))) + '.' + format;
+													
+												}
+												else //dir
+												{
+													outFileName = path.join(path.dirname(curFile), path.basename(curFile,
+														path.extname(curFile))) + '.' + format;
 												}
-											}
-											else if (inStat.isFile())
-											{
-												outFileName = path.join(path.dirname(paths[0]), path.basename(paths[0],
-													path.extname(paths[0]))) + '.' + format;
-												
-											}
-											else //dir
-											{
-												outFileName = path.join(path.dirname(curFile), path.basename(curFile,
-													path.extname(curFile))) + '.' + format;
-											}
-											
-											try
-											{
-												var counter = 0;
-												var realFileName = outFileName;
 												
-												if (program.rawArgs.indexOf('-k') > -1 || program.rawArgs.indexOf('--check') > -1)
+												try
 												{
-													while (fs.existsSync(realFileName))
+													var counter = 0;
+													var realFileName = outFileName;
+													
+													if (program.rawArgs.indexOf('-k') > -1 || program.rawArgs.indexOf('--check') > -1)
 													{
-														counter++;
-														realFileName = path.join(path.dirname(outFileName), path.basename(outFileName,
-															path.extname(outFileName))) + '-' + counter + path.extname(outFileName);
+														while (fs.existsSync(realFileName))
+														{
+															counter++;
+															realFileName = path.join(path.dirname(outFileName), path.basename(outFileName,
+																path.extname(outFileName))) + '-' + counter + path.extname(outFileName);
+														}
 													}
+													
+													fs.writeFileSync(realFileName, data, format == 'vsdx'? 'base64' : null, { flag: 'wx' });
+													console.log(curFile + ' -> ' + outFileName);
+												}
+												catch(e)
+												{
+													console.error('Error writing to file: ' + outFileName);
 												}
-												
-												fs.writeFileSync(realFileName, data, format == 'vsdx'? 'base64' : null, { flag: 'wx' });
-												console.log(curFile + ' -> ' + outFileName);
 											}
-											catch(e)
+											else
 											{
-												console.error('Error writing to file: ' + outFileName);
+												console.error('Error: ' + data + ': ' + curFile);
 											}
+											
+											next();
 										}
-										else
-										{
-											console.error('Error: ' + data + ': ' + curFile);
-										}
-										
-										fileIndex++;
-										
-										if (fileIndex < files.length)
-										{
-											processOneFile();
-										}
-										else
+										finally
 										{
-											cmdQPressed = true;
-											dummyWin.destroy();
+											mockEvent.finalize();
 										}
-									}
-									finally
-									{
-										mockEvent.finalize();
-									}
-						    	}
+							    	}
+								};
+
+								exportDiagram(mockEvent, expArgs, true);
 							};
-					    	
-							exportDiagram(mockEvent, expArgs, true);
 						}
 						catch(e)
 						{
 							console.error('Error reading file: ' + curFile);
-							
-							fileIndex++;
-							
-							if (fileIndex < files.length)
-							{	
-								processOneFile();
-							}
-							else
-							{
-								cmdQPressed = true;
-								dummyWin.destroy();
-							}
+							next();
 						}
 					}
 					
@@ -1092,10 +1123,34 @@ function exportDiagram(event, args, directFinalize)
 
 		contents.on('did-finish-load', function()
 	    {
+			//Set finalize here since it is call in the reply below
+			function finalize()
+			{
+				browser.destroy();
+			};
+			
+			if (directFinalize === true)
+			{
+				event.finalize = finalize;
+			}
+			else
+			{
+				//Destroy the window after response being received by caller
+				ipcMain.once('export-finalize', finalize);
+			}
+
 			ipcMain.once('render-finished', (evt, bounds) =>
 			{
 				//For some reason, Electron 9 doesn't send this object as is without stringifying. Usually when variable is external to function own scope
-				bounds = JSON.parse(bounds.bounds);
+				try
+				{
+					bounds = JSON.parse(bounds.bounds);
+				}
+				catch(e)
+				{
+					bounds = null;
+				}
+				
 				var pdfOptions = {pageSize: 'A4'};
 				var hasError = false;
 				
@@ -1127,22 +1182,6 @@ function exportDiagram(event, args, directFinalize)
 				
 				var base64encoded = args.base64 == '1';
 				
-				//Set finalize here since it is call in the reply below
-				function finalize()
-				{
-					browser.destroy();
-				};
-				
-				if (directFinalize === true)
-				{
-					event.finalize = finalize;
-				}
-				else
-				{
-					//Destroy the window after response being received by caller
-					ipcMain.once('export-finalize', finalize);
-				}
-				
 				if (hasError)
 				{
 					event.reply('export-error');
@@ -1212,6 +1251,19 @@ function exportDiagram(event, args, directFinalize)
 				}
 			});
 
+			if (args.format == 'xml')
+			{
+				ipcMain.once('xml-data', (evt, data) =>
+				{
+					event.reply('export-success', data);
+				});
+				
+				ipcMain.once('xml-data-error', () =>
+				{
+					event.reply('export-error');
+				});
+			}
+			
 			contents.send('render', {
 				xml: args.xml,
 				format: args.format,
@@ -1224,7 +1276,8 @@ function exportDiagram(event, args, directFinalize)
 				pageId: args.pageId,
 				allPages: args.allPages,
 				scale: args.scale || 1,
-				extras: args.extras
+				extras: args.extras,
+				uncompressed: args.uncompressed
 			});
 	    });
 	}

+ 25 - 1
src/main/webapp/export3.html

@@ -108,7 +108,31 @@
 			var xmlDoc = node.ownerDocument;
 			var diagrams = null;
 			var from = 0;
-			
+
+			if (mxIsElectron && data.format == 'xml')
+			{
+				const { ipcRenderer } = require('electron');
+
+				try
+				{
+					var xml = mxUtils.getXml(xmlDoc);
+					EditorUi.prototype.createUi = function(){};
+					EditorUi.prototype.addTrees = function(){};
+					EditorUi.prototype.updateActionStates = function(){};
+				 	var editorUi = new EditorUi();
+					var tmpFile = new LocalFile(editorUi, xml);
+					editorUi.setCurrentFile(tmpFile);
+					editorUi.setFileData(xml);
+					ipcRenderer.send('xml-data', mxUtils.getXml(editorUi.getXmlFileData(null, null, data.uncompressed)));
+				}
+				catch(e)
+				{
+					ipcRenderer.send('xml-data-error');
+				}
+				
+				return;
+			}
+
 			// Handles mxfile
 			if (xmlDoc.documentElement.nodeName == 'mxfile')
 			{

文件差异内容过多而无法显示
+ 478 - 469
src/main/webapp/js/app.min.js


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

@@ -5317,7 +5317,9 @@ App.prototype.updateButtonContainer = function()
 		}
 		
 		// Share
-		if (file != null && file.constructor == DriveFile)
+		if (urlParams['embed'] != '1' && this.getServiceName() == 'draw.io' &&
+			!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
+			!this.isOfflineApp() && file != null)
 		{
 			if (this.shareButton == null)
 			{

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

@@ -744,6 +744,7 @@ var SplashDialog = function(editorUi)
 			
 			var link = document.createElement('a');
 			link.style.display = 'inline-block';
+			link.style.color = 'gray';
 			link.style.cursor = 'pointer';
 			link.style.marginTop = '6px';
 			mxUtils.write(link, mxResources.get('signOut'));
@@ -872,6 +873,7 @@ var SplashDialog = function(editorUi)
 		mxUtils.br(buttons);
 		var link = document.createElement('a');
 		link.style.display = 'inline-block';
+		link.style.color = 'gray';
 		link.style.cursor = 'pointer';
 		link.style.marginTop = '8px';
 		mxUtils.write(link, mxResources.get('changeStorage'));
@@ -8763,7 +8765,7 @@ var LibraryDialog = function(editorUi, name, library, initialImages, file, mode)
 	    	
     	if (editorUi.isLocalFileSave())
     	{
-    		editorUi.saveLocalFile(data, filename, 'text/xml', null, null, true);
+    		editorUi.saveLocalFile(data, filename, 'text/xml', null, null, true, null, 'xml');
     	}
     	else
     	{

+ 18 - 4
src/main/webapp/js/diagramly/DrawioFile.js

@@ -1017,6 +1017,17 @@ DrawioFile.prototype.isTrashed = function()
  */
 DrawioFile.prototype.move = function(folderId, success, error) { };
 
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+DrawioFile.prototype.share = function()
+{
+	this.ui.alert(mxResources.get('sharingAvailable'), null, 380);
+};
+
 /**
  * Returns the hash of the file which consists of a prefix for the storage
  * type and the ID of the file.
@@ -1482,8 +1493,8 @@ DrawioFile.prototype.addUnsavedStatus = function(err)
 			var status = mxUtils.htmlEntities(mxResources.get('unsavedChangesClickHereToSave')) +
 				((msg != null && msg != '') ? ' (' + mxUtils.htmlEntities(msg) + ')' : '');
 			this.ui.editor.setStatus('<div title="'+ status +
-				'" class="geStatusAlert" style="cursor:pointer;overflow:hidden;">' +
-				status + '</div>');
+				'" class="geStatusAlertOrange" style="cursor:pointer;overflow:hidden;">' + status + ' <img src="' +
+				Editor.saveImage + '" align="top" style="width:16px;margin-top:-2px"/></div>');
 			
 			// Installs click handler for saving
 			var links = this.ui.statusContainer.getElementsByTagName('div');
@@ -1946,7 +1957,7 @@ DrawioFile.prototype.fileChanged = function()
 /**
  * Creates a secret and token pair for writing a patch to the cache.
  */
-DrawioFile.prototype.createSecret = function(success, error)
+DrawioFile.prototype.createSecret = function(success)
 {
 	var secret = Editor.guid(32);
 	
@@ -1955,7 +1966,10 @@ DrawioFile.prototype.createSecret = function(success, error)
 		this.sync.createToken(secret, mxUtils.bind(this, function(token)
 		{
 			success(secret, token);
-		}), error);
+		}), mxUtils.bind(this, function()
+		{
+			success(secret);
+		}));
 	}
 	else
 	{

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

@@ -848,7 +848,7 @@ DrawioFileSync.prototype.catchup = function(desc, success, error, abort)
 											}
 											// Retries if cache entry was not yet there
 											else if (cacheReadyRetryCount <= this.maxCacheReadyRetries - 1 &&
-												!failed && req.getStatus() != 401)
+												!failed && req.getStatus() != 401 && req.getStatus() != 503)
 											{
 												cacheReadyRetryCount++;
 												this.file.stats.cacheMiss++;

+ 25 - 19
src/main/webapp/js/diagramly/DriveFile.js

@@ -217,15 +217,22 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
 									
 									// Shows possible errors but keeps the modified flag as the
 									// file was saved but the cache entry could not be written
-									this.fileSaved(savedData, lastDesc, mxUtils.bind(this, function()
+									if (token != null)
 									{
-										this.contentChanged();
-										
-										if (success != null)
+										this.fileSaved(savedData, lastDesc, mxUtils.bind(this, function()
 										{
-											success(resp);
-										}
-									}), error, token);
+											this.contentChanged();
+											
+											if (success != null)
+											{
+												success(resp);
+											}
+										}), error, token);
+									}
+									else
+									{
+										success(resp);
+									}
 								}
 								else if (error != null)
 								{
@@ -319,18 +326,6 @@ DriveFile.prototype.saveFile = function(title, revision, success, error, unloadi
 				});
 				
 				doSave(overwrite, revision);				
-			}), mxUtils.bind(this, function(e)
-			{
-				this.savingFile = false;
-				
-				if (error != null)
-				{
-					error(e);
-				}
-				else
-				{
-					throw e;
-				}
 			}));
 		}
 	}
@@ -481,6 +476,17 @@ DriveFile.prototype.move = function(folderId, success, error)
 	}), error);
 };
 
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+DriveFile.prototype.share = function()
+{
+	this.ui.drive.showPermissions(this.getId());
+};
+
 /**
  * Translates this point by the given vector.
  * 

+ 5 - 0
src/main/webapp/js/diagramly/Editor.js

@@ -62,6 +62,11 @@
 		{commonStyle:  {fontColor: '#E4FDE1', strokeColor: '#028090', fillColor: '#F45B69'},
 			graph: {background: '#114B5F', gridColor: '#0B3240'}}
 	];
+	
+	/**
+	 * 
+	 */
+	Editor.saveImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=';
 
 	/**
 	 * Used in the GraphViewer lightbox.

+ 7 - 6
src/main/webapp/js/diagramly/EditorUi.js

@@ -3874,10 +3874,10 @@
 	 * @param {number} dx X-coordinate of the translation.
 	 * @param {number} dy Y-coordinate of the translation.
 	 */
-	EditorUi.prototype.alert = function(msg, fn)
+	EditorUi.prototype.alert = function(msg, fn, optionalWidth)
 	{
 		var dlg = new ErrorDialog(this, null, msg, mxResources.get('ok'), fn);
-		this.showDialog(dlg.container, 340, 100, true, false);
+		this.showDialog(dlg.container, optionalWidth || 340, 100, true, false);
 		dlg.init();
 	};
 	
@@ -4137,7 +4137,7 @@
 	 * @param {number} dx X-coordinate of the translation.
 	 * @param {number} dy Y-coordinate of the translation.
 	 */
-	EditorUi.prototype.doSaveLocalFile = function(data, filename, mimeType, base64Encoded, format)
+	EditorUi.prototype.doSaveLocalFile = function(data, filename, mimeType, base64Encoded, format, defaultExtension)
 	{
 		// Appends .drawio extension for XML files with no extension
 		// to avoid the browser to automatically append .xml instead
@@ -4145,7 +4145,8 @@
 			!/(\.drawio)$/i.test(filename) &&
 			!/(\.xml)$/i.test(filename))
 		{
-			filename = filename + '.drawio';
+			defaultExtension = (defaultExtension != null) ? defaultExtension : 'drawio';
+			filename = filename + '.' + defaultExtension;
 		}
 		
 		// Newer versions of IE
@@ -4304,7 +4305,7 @@
 	 * @param {number} dx X-coordinate of the translation.
 	 * @param {number} dy Y-coordinate of the translation.
 	 */
-	EditorUi.prototype.saveLocalFile = function(data, filename, mimeType, base64Encoded, format, allowBrowser, allowTab)
+	EditorUi.prototype.saveLocalFile = function(data, filename, mimeType, base64Encoded, format, allowBrowser, allowTab, defaultExtension)
 	{
 		allowBrowser = (allowBrowser != null) ? allowBrowser : false;
 		allowTab = (allowTab != null) ? allowTab : (format != 'vsdx') && (!mxClient.IS_IOS || !navigator.standalone);
@@ -4345,7 +4346,7 @@
 				}
 				else if (mode == App.MODE_DEVICE || mode == 'download')
 				{
-					this.doSaveLocalFile(data, newTitle, mimeType, base64Encoded);
+					this.doSaveLocalFile(data, newTitle, mimeType, base64Encoded, null, defaultExtension);
 				} 
 				else if (newTitle != null && newTitle.length > 0)
 				{

+ 3 - 3
src/main/webapp/js/diagramly/Extensions.js

@@ -5137,7 +5137,7 @@ LucidImporter = {};
 					
 					if (p.Shape != 'diagonal')
 					{
-						if (p.ElbowPoints != null)
+						if (p.ElbowPoints != null && p.ElbowPoints.length > 0)
 						{
 							cell.geometry.points = [];
 							
@@ -5200,7 +5200,7 @@ LucidImporter = {};
 						}
 					}
 
-					var waypoints = p.ElbowControlPoints || p.Joints;
+					var waypoints = p.ElbowControlPoints || p.BezierJoints || p.Joints;
 					
 					if (waypoints != null)
 					{
@@ -5208,7 +5208,7 @@ LucidImporter = {};
 						
 						for (var i = 0; i < waypoints.length; i++)
 						{
-							var pt = waypoints[i];
+							var pt = waypoints[i].p ? waypoints[i].p : waypoints[i];
 							
 							cell.geometry.points.push(new mxPoint(
 								Math.round(pt.x * scale + dx),

+ 13 - 0
src/main/webapp/js/diagramly/GitHubFile.js

@@ -13,6 +13,19 @@ GitHubFile = function(ui, data, meta)
 //Extends mxEventSource
 mxUtils.extend(GitHubFile, DrawioFile);
 
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitHubFile.prototype.share = function()
+{
+	this.ui.editor.graph.openLink('https://github.com/' +
+		encodeURIComponent(this.meta.org) + '/' +
+		encodeURIComponent(this.meta.repo) +'/settings/access');
+};
+
 /**
  * Translates this point by the given vector.
  * 

+ 13 - 0
src/main/webapp/js/diagramly/GitLabFile.js

@@ -12,6 +12,19 @@ GitLabFile = function(ui, data, meta)
 //Extends mxEventSource
 mxUtils.extend(GitLabFile, GitHubFile);
 
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+GitLabFile.prototype.share = function()
+{
+	this.ui.editor.graph.openLink('https://gitlab.com/' +
+		encodeURIComponent(this.meta.org) + '/' +
+		encodeURIComponent(this.meta.repo) +'/-/project_members');
+};
+
 /**
  * Translates this point by the given vector.
  * 

+ 11 - 4
src/main/webapp/js/diagramly/Menus.js

@@ -2572,7 +2572,7 @@
 				
 				if (file != null)
 				{
-					editorUi.drive.showPermissions(file.getId());
+					file.share();
 				}
 			}
 			catch (e)
@@ -3479,10 +3479,17 @@
 						}
 					}
 					
-					this.addMenuItems(menu, ['-', 'save', 'saveAs'], parent);
+					this.addMenuItems(menu, ['-', 'save', 'saveAs', '-'], parent);
+					
+					if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
+						editorUi.getServiceName() == 'draw.io' &&
+						!editorUi.isOfflineApp() && file != null)
+					{
+						this.addMenuItems(menu, ['share', '-'], parent);
+					}
+					
+					this.addMenuItems(menu, ['rename'], parent);
 					
-					this.addMenuItems(menu, ['-', 'rename'], parent);
-
 					if (editorUi.isOfflineApp())
 					{
 						if (navigator.onLine && urlParams['stealth'] != '1')

+ 62 - 0
src/main/webapp/js/diagramly/OneDriveFile.js

@@ -6,12 +6,74 @@ OneDriveFile = function(ui, data, meta)
 {
 	DrawioFile.call(this, ui, data);
 	
+	console.log('meta', meta);
+	
 	this.meta = meta;
 };
 
 //Extends mxEventSource
 mxUtils.extend(OneDriveFile, DrawioFile);
 
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+OneDriveFile.prototype.share = function()
+{
+	var url = this.meta.webUrl;
+	url = url.substring(0, url.lastIndexOf('/'));
+	
+	if (this.meta.parentReference != null)
+	{
+		try
+		{
+			// Best effort guessing of the web interface URL for the file
+			if (this.meta.parentReference.driveType == 'personal')
+			{
+				url = 'https://onedrive.live.com/?cid=' + encodeURIComponent(this.meta.parentReference.driveId) +
+					'&id=' + encodeURIComponent(this.meta.id);
+			}
+			else if (this.meta.parentReference.driveType == 'documentLibrary')
+			{
+				var path = this.meta.parentReference.path;
+				path = path.substring(path.indexOf('/root:') + 6);
+				
+				var id = this.meta.webUrl;
+				var url = id.substring(0, id.length - path.length - this.meta.name.length - ((path.length > 0) ? 1 : 0)); 
+				id = id.substring(id.indexOf('/', 8));
+				
+				url = url + '/Forms/AllItems.aspx?id=' + id + '&parent=' + id.substring(0, id.lastIndexOf('/'));
+			}
+			else if (this.meta.parentReference.driveType == 'business')
+			{
+				var url = this.meta['@microsoft.graph.downloadUrl'];
+				var idx = url.indexOf('/_layouts/15/download.aspx?');
+			
+				// Strips protocol
+				var id = this.meta.webUrl;
+				var parent = id;
+				
+				id = id.substring(8);
+			
+				// Gets path and parent path
+				id = id.substring(id.indexOf('/'));
+				parent = parent.substring(0, parent.lastIndexOf('/'));
+				parent = parent.substring(parent.indexOf('/', 8))
+				
+				url = url.substring(0, idx) + '/_layouts/15/onedrive.aspx?id=' + id + '&parent=' + parent;
+			}
+		}
+		catch (e)
+		{
+			// ignore
+		}
+	}
+	
+	this.ui.editor.graph.openLink(url);
+};
+
 /**
  * Translates this point by the given vector.
  * 

+ 1 - 1
src/main/webapp/js/diagramly/sidebar/Sidebar-MSCAE.js

@@ -1391,7 +1391,7 @@
 			this.createVertexTemplateEntry(s + 'AzureFXTEdgeFiler.svg;',
 					r * 0.5, r * 0.5, '', 'AzureFXTEdgeFiler', null, null, this.getTagsForStencil(gn, 'azurefxtedgefiler', dt).join(' ')),
 			this.createVertexTemplateEntry(s + 'Blog_Storage.svg;',
-					r * 0.5, r * 0.46, '', 'Blog Storage', null, null, this.getTagsForStencil(gn, 'blog storage', dt).join(' ')),
+					r * 0.5, r * 0.46, '', 'Blob Storage', null, null, this.getTagsForStencil(gn, 'blob storage', dt).join(' ')),
 			this.createVertexTemplateEntry(s + 'Data_Box_Edge_Data_Box_Gateway.svg;',
 					r * 0.5, r * 0.32, '', 'Data Box Edge - Data Box Gateway', null, null, this.getTagsForStencil(gn, 'data box edge data gateway', dt).join(' ')),
 			this.createVertexTemplateEntry(s + 'Data_Box.svg;',

文件差异内容过多而无法显示
+ 246 - 245
src/main/webapp/js/extensions.min.js


+ 50 - 51
src/main/webapp/js/mxgraph/EditorUi.js

@@ -1195,43 +1195,43 @@ EditorUi.prototype.installShapePicker = function()
 		}
 	};
 	
-//	if (this.hoverIcons != null)
-//	{
-//		// Adds hover icons handling
-//		var hoverIconsExecute = this.hoverIcons.execute;
-//		
-//		this.hoverIcons.execute = function(state, dir, me)
-//		{
-//			var evt = me.getEvent();
-//			
-//			if (!mxEvent.isControlDown(evt) && !mxEvent.isShiftDown(evt))
-//			{
-//				var x = me.getGraphX();
-//				var y = me.getGraphY();
-//
-//				var temp = graph.getCompositeParent(state.cell);
-//				var geo = graph.getCellGeometry(temp);
-//				
-//				while (temp != null && graph.model.isVertex(temp) && geo != null && geo.relative)
-//				{
-//					cell = temp;
-//					temp = graph.model.getParent(cell)
-//					geo = graph.getCellGeometry(temp);
-//				}
-//				
-//				ui.showShapePicker(x, y, temp, mxUtils.bind(this, function(cell)
-//				{
-//					graph.selectCellsForConnectVertex(this.graph.connectVertex(
-//						state.cell, dir, graph.defaultEdgeLength, evt, null, null,
-//						cell, cell == null), evt, graph);
-//				}));
-//			}
-//			else
-//			{
-//				hoverIconsExecute.apply(this, arguments);
-//			}
-//		};
-//	}
+	if (this.hoverIcons != null)
+	{
+		var hoverIconsExecute = this.hoverIcons.execute;
+		
+		this.hoverIcons.execute = function(state, dir, me)
+		{
+			var evt = me.getEvent();
+			
+			if (!mxEvent.isControlDown(evt) && !mxEvent.isShiftDown(evt))
+			{
+				this.graph.connectVertex(state.cell, dir, this.graph.defaultEdgeLength, evt, null, null, mxUtils.bind(this, function(x, y, execute)
+				{
+					var temp = graph.getCompositeParent(state.cell);
+					var geo = graph.getCellGeometry(temp);
+					
+					while (temp != null && graph.model.isVertex(temp) && geo != null && geo.relative)
+					{
+						cell = temp;
+						temp = graph.model.getParent(cell)
+						geo = graph.getCellGeometry(temp);
+					}
+					
+					ui.showShapePicker(me.getGraphX(), me.getGraphY(), temp, mxUtils.bind(this, function(cell)
+					{
+						execute(cell);
+					}));
+				}), mxUtils.bind(this, function(result)
+				{
+					this.graph.selectCellsForConnectVertex(result, evt, this);
+				}));
+			}
+			else
+			{
+				hoverIconsExecute.apply(this, arguments);
+			}
+		};
+	}
 };
 
 /**
@@ -1248,8 +1248,8 @@ EditorUi.prototype.showShapePicker = function(x, y, cell, callback)
 		var div = document.createElement('div');
 	
 		div.className = 'geToolbarContainer geSidebarContainer geSidebar';
-		div.style.cssText = 'position:absolute;left:' + (x - 70) + 'px;top:' +
-			y + 'px;width:140px;border-radius:10px;padding:4px;text-align:center;' +
+		div.style.cssText = 'position:absolute;left:' + (x - 22) + 'px;top:' +
+			(y - 22) + 'px;width:140px;border-radius:10px;padding:4px;text-align:center;' +
 			'box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;';
 		graph.container.appendChild(div);
 		
@@ -1307,6 +1307,9 @@ EditorUi.prototype.showShapePicker = function(x, y, cell, callback)
 
 		this.shapePickerCallback = callback;
 		this.shapePicker = div;
+
+		graph.tooltipHandler.hideTooltip();
+		this.hideCurrentMenu();
 	}
 };
 
@@ -1323,24 +1326,20 @@ EditorUi.prototype.getCellsForShapePicker = function(cell)
 	return [(cell != null) ? this.editor.graph.cloneCell(cell) :
 			createVertex('text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;', 40, 20, 'Text'),
 		createVertex('whiteSpace=wrap;html=1;'),
-		createVertex('rounded=1;whiteSpace=wrap;html=1;'),
 		createVertex('ellipse;whiteSpace=wrap;html=1;', 120, 80),
-		createVertex('shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;'),
 		createVertex('rhombus;whiteSpace=wrap;html=1;', 80, 80),
 		createVertex('shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;'),
-		createVertex('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;', 120, 80),
+		createVertex('shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;', 120, 60),
+		createVertex('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80),
+		createVertex('shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80),
+		createVertex('shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;'),
+		createVertex('shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;', 120, 80),
+		createVertex('shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;', 80, 100),
 		createVertex('triangle;whiteSpace=wrap;html=1;', 60, 80),
-		createVertex('shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;', 60, 80),
-		createVertex('ellipse;shape=cloud;whiteSpace=wrap;html=1;', 120, 80),
 		createVertex('shape=document;whiteSpace=wrap;html=1;boundedLbl=1;', 120, 80),
-		createVertex('shape=cube;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;darkOpacity=0.05;darkOpacity2=0.1;', 120, 80),
-		createVertex('shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80),
-		createVertex('shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;', 120, 60),
 		createVertex('shape=tape;whiteSpace=wrap;html=1;', 120, 100),
-		createVertex('shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;', 80, 100),
-		createVertex('shape=card;whiteSpace=wrap;html=1;', 80, 100),
-		createVertex('shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;', 120, 80),
-		createVertex('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;', 30, 60)];
+		createVertex('ellipse;shape=cloud;whiteSpace=wrap;html=1;', 120, 80),
+		createVertex('shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;', 60, 80)];
 };
 
 /**

+ 7 - 7
src/main/webapp/js/mxgraph/Format.js

@@ -2179,7 +2179,7 @@ ArrangePanel.prototype.addGeometry = function(container)
 	autosizeBtn.style.cursor = 'pointer';
 	autosizeBtn.style.marginTop = '-3px';
 	autosizeBtn.style.border = '0px';
-	autosizeBtn.style.left = '52px';
+	autosizeBtn.style.left = '42px';
 	mxUtils.setOpacity(autosizeBtn, 50);
 	
 	mxEvent.addListener(autosizeBtn, 'mouseenter', function()
@@ -3098,7 +3098,7 @@ TextFormatPanel.prototype.addFont = function(container)
 		input.style.right = '32px';
 	}
 	
-	input.style.width = '46px';
+	input.style.width = '40px';
 	input.style.height = (mxClient.IS_QUIRKS) ? '21px' : '17px';
 	stylePanel2.appendChild(input);
 	
@@ -4843,14 +4843,14 @@ StyleFormatPanel.prototype.addStroke = function(container)
 	if (!mxClient.IS_QUIRKS)
 	{
 		input.style.position = 'absolute';
-		input.style.right = '32px';
 		input.style.height = '15px';
-		stepper.style.right = '20px';
+		input.style.left = '141px';
+		stepper.style.left = '190px';
 
 		altInput.style.position = 'absolute';
-		altInput.style.right = '32px';
+		altInput.style.left = '141px';
 		altInput.style.height = '15px';
-		altStepper.style.right = '20px';
+		altStepper.style.left = '190px';
 	}
 	else
 	{
@@ -4995,7 +4995,7 @@ StyleFormatPanel.prototype.addStroke = function(container)
 	
 	var symbol = this.addArrow(pattern, 9);
 	symbol.className = 'geIcon';
-	symbol.style.width = '84px';
+	symbol.style.width = 'auto';
 	
 	var altSymbol = this.addArrow(altPattern, 9);
 	altSymbol.className = 'geIcon';

+ 97 - 87
src/main/webapp/js/mxgraph/Graph.js

@@ -2752,15 +2752,7 @@ Graph.prototype.selectCellsForConnectVertex = function(cells, evt, hoverIcons)
 /**
  * Adds a connection to the given vertex.
  */
-Graph.prototype.getConnectVertexTargetAt = function(source, x, y, fn)
-{
-	return this.getCellAt(x, y);
-};
-
-/**
- * Adds a connection to the given vertex.
- */
-Graph.prototype.connectVertex = function(source, direction, length, evt, forceClone, ignoreCellAt, targetCell, forceShift)
+Graph.prototype.connectVertex = function(source, direction, length, evt, forceClone, ignoreCellAt, createTarget, done)
 {
 	// Ignores relative edge labels
 	if (source.geometry.relative && this.model.isEdge(source.parent))
@@ -2773,9 +2765,9 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	var composite = this.getCompositeParent(source);
 	
 	var pt = (source.geometry.relative && source.parent.geometry != null) ?
-			new mxPoint(source.parent.geometry.width * source.geometry.x,
-				source.parent.geometry.height * source.geometry.y) :
-			new mxPoint(composite.geometry.x, composite.geometry.y);
+		new mxPoint(source.parent.geometry.width * source.geometry.x,
+			source.parent.geometry.height * source.geometry.y) :
+		new mxPoint(composite.geometry.x, composite.geometry.y);
 		
 	if (direction == mxConstants.DIRECTION_NORTH)
 	{
@@ -2819,7 +2811,7 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	
 	// Checks actual end point of edge for target cell
 	var target = (ignoreCellAt || (mxEvent.isControlDown(evt) && !forceClone)) ?
-		null : this.getConnectVertexTargetAt(source, dx + pt.x * s, dy + pt.y * s);
+		null : this.getCellAt(dx + pt.x * s, dy + pt.y * s);
 	
 	if (this.model.isAncestor(target, source))
 	{
@@ -2852,7 +2844,7 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 		}
 	}
 	
-	var duplicate = ((!mxEvent.isShiftDown(evt) || mxEvent.isControlDown(evt))  && !forceShift) || forceClone;
+	var duplicate = (!mxEvent.isShiftDown(evt) || mxEvent.isControlDown(evt)) || forceClone;
 	
 	if (duplicate)
 	{
@@ -2893,109 +2885,127 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	}
 	
 	var result = [];
+	var swimlane = target != null && this.isSwimlane(target);
+	var realTarget = (!swimlane) ? target : null;
 	
-	this.model.beginUpdate();
-	try
+	var execute = mxUtils.bind(this, function(targetCell)
 	{
-		var swimlane = target != null && this.isSwimlane(target);
-		var realTarget = (!swimlane) ? target : null;
-		
-		if (realTarget == null && duplicate)
+		this.model.beginUpdate();
+		try
 		{
-			// Handles relative children
-			var cellToClone = (targetCell != null) ? targetCell : source;
-			var geo = this.getCellGeometry(cellToClone);
+			if (realTarget == null && duplicate)
+			{
+				// Handles relative children
+				var cellToClone = (targetCell != null) ? targetCell : source;
+				var geo = this.getCellGeometry(cellToClone);
+				
+				while (geo != null && geo.relative)
+				{
+					cellToClone = this.getModel().getParent(cellToClone);
+					geo = this.getCellGeometry(cellToClone);
+				}
+				
+				// Handles composite cells for cloning
+				cellToClone = this.getCompositeParent(cellToClone);
+				realTarget = this.duplicateCells([cellToClone], false)[0];
+				
+				var geo = this.getCellGeometry(realTarget);
+				
+				if (geo != null)
+				{
+					geo.x = pt.x - geo.width / 2;
+					geo.y = pt.y - geo.height / 2;
+				}
+				
+				if (swimlane || targetCell != null)
+				{
+					this.addCells([realTarget], target, null, null, null, true);
+					target = null;
+				}
+			}
 			
-			while (geo != null && geo.relative)
+			// Never connects children in stack layouts
+			var layout = null;
+	
+			if (this.layoutManager != null)
 			{
-				cellToClone = this.getModel().getParent(cellToClone);
-				geo = this.getCellGeometry(cellToClone);
+				layout = this.layoutManager.getLayout(this.model.getParent(source));
 			}
+	
+			var edge = ((mxEvent.isControlDown(evt) && mxEvent.isShiftDown(evt) && duplicate) ||
+				(target == null && layout != null && layout.constructor == mxStackLayout)) ? null :
+				this.insertEdge(this.model.getParent(source), null, '', source, realTarget, this.createCurrentEdgeStyle());
+	
+			// Inserts edge before source
+			if (edge != null && this.connectionHandler.insertBeforeSource)
+			{
+				var index = null;
+				var tmp = source;
+				
+				while (tmp.parent != null && tmp.geometry != null &&
+					tmp.geometry.relative && tmp.parent != edge.parent)
+				{
+					tmp = this.model.getParent(tmp);
+				}
 			
-			// Handles composite cells for cloning
-			cellToClone = this.getCompositeParent(cellToClone);
-			realTarget = this.duplicateCells([cellToClone], false)[0];
+				if (tmp != null && tmp.parent != null && tmp.parent == edge.parent)
+				{
+					var index = tmp.parent.getIndex(tmp);
+					this.model.add(tmp.parent, edge, index);
+				}
+			}
 			
-			var geo = this.getCellGeometry(realTarget);
+			// Special case: Click on west icon puts clone before cell
+			if (target == null && realTarget != null && layout != null && source.parent != null &&
+				layout.constructor == mxStackLayout && direction == mxConstants.DIRECTION_WEST)
+			{
+				var index = source.parent.getIndex(source);
+				this.model.add(source.parent, realTarget, index);
+			}
 			
-			if (geo != null)
+			if (edge != null)
 			{
-				geo.x = pt.x - geo.width / 2;
-				geo.y = pt.y - geo.height / 2;
+				result.push(edge);
 			}
 			
-			if (swimlane || targetCell != null)
+			if (target == null && realTarget != null)
 			{
-				this.addCells([realTarget], target, null, null, null, true);
-				target = null;
+				result.push(realTarget);
 			}
-		}
-		
-		// Never connects children in stack layouts
-		var layout = null;
-
-		if (this.layoutManager != null)
-		{
-			layout = this.layoutManager.getLayout(this.model.getParent(source));
-		}
-
-		var edge = ((mxEvent.isControlDown(evt) && mxEvent.isShiftDown(evt) && duplicate) ||
-			(target == null && layout != null && layout.constructor == mxStackLayout)) ? null :
-			this.insertEdge(this.model.getParent(source), null, '', source, realTarget, this.createCurrentEdgeStyle());
-
-		// Inserts edge before source
-		if (edge != null && this.connectionHandler.insertBeforeSource)
-		{
-			var index = null;
-			var tmp = source;
 			
-			while (tmp.parent != null && tmp.geometry != null &&
-				tmp.geometry.relative && tmp.parent != edge.parent)
+			if (realTarget == null && edge != null)
 			{
-				tmp = this.model.getParent(tmp);
+				edge.geometry.setTerminalPoint(pt, false);
 			}
-		
-			if (tmp != null && tmp.parent != null && tmp.parent == edge.parent)
+			
+			if (edge != null)
 			{
-				var index = tmp.parent.getIndex(tmp);
-				this.model.add(tmp.parent, edge, index);
+				this.fireEvent(new mxEventObject('cellsInserted', 'cells', [edge]));
 			}
 		}
-		
-		// Special case: Click on west icon puts clone before cell
-		if (target == null && realTarget != null && layout != null && source.parent != null &&
-			layout.constructor == mxStackLayout && direction == mxConstants.DIRECTION_WEST)
-		{
-			var index = source.parent.getIndex(source);
-			this.model.add(source.parent, realTarget, index);
-		}
-		
-		if (edge != null)
-		{
-			result.push(edge);
-		}
-		
-		if (target == null && realTarget != null)
+		finally
 		{
-			result.push(realTarget);
+			this.model.endUpdate();
 		}
 		
-		if (realTarget == null && edge != null)
+		if (done != null)
 		{
-			edge.geometry.setTerminalPoint(pt, false);
+			done(result);
 		}
-		
-		if (edge != null)
+		else
 		{
-			this.fireEvent(new mxEventObject('cellsInserted', 'cells', [edge]));
+			return result;
 		}
+	});
+	
+	if (createTarget != null && realTarget == null && duplicate)
+	{
+		createTarget(dx + pt.x * s, dy + pt.y * s, execute);
 	}
-	finally
+	else
 	{
-		this.model.endUpdate();
+		return execute();
 	}
-	
-	return result;
 };
 
 /**

+ 9 - 5
src/main/webapp/js/mxgraph/Shapes.js

@@ -1220,13 +1220,16 @@
 	};
 	mxUtils.extend(HexagonShape, mxHexagon);
 	HexagonShape.prototype.size = 0.25;
+	HexagonShape.prototype.fixedSize = 20;
 	HexagonShape.prototype.isRoundable = function()
 	{
 		return true;
 	};
 	HexagonShape.prototype.redrawPath = function(c, x, y, w, h)
 	{
-		var s =  w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));
+		var fixed = mxUtils.getValue(this.style, 'fixedSize', '0') != '0';
+		var s = (fixed) ? Math.max(0, Math.min(w, parseFloat(mxUtils.getValue(this.style, 'size', this.fixedSize)))) :
+			w * Math.max(0, Math.min(1, parseFloat(mxUtils.getValue(this.style, 'size', this.size))));
 		var arcSize = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2;
 		this.addPoints(c, [new mxPoint(s, 0), new mxPoint(w - s, 0), new mxPoint(w, 0.5 * h), new mxPoint(w - s, h),
 		                   new mxPoint(s, h), new mxPoint(0, 0.5 * h)], this.isRounded, arcSize, true);
@@ -1999,7 +2002,8 @@
 	// Hexagon Perimeter 2 (keep existing one)
 	mxPerimeter.HexagonPerimeter2 = function (bounds, vertex, next, orthogonal)
 	{
-		var size = HexagonShape.prototype.size;
+		var fixed = mxUtils.getValue(vertex.style, 'fixedSize', '0') != '0';
+		var size = (fixed) ? HexagonShape.prototype.fixedSize : HexagonShape.prototype.size;
 		
 		if (vertex != null)
 		{
@@ -2023,14 +2027,14 @@
 		
 		if (vertical)
 		{
-			var dy = h * Math.max(0, Math.min(1, size));
+			var dy = (fixed) ? Math.max(0, Math.min(h, size)) : h * Math.max(0, Math.min(1, size));
 			points = [new mxPoint(cx, y), new mxPoint(x + w, y + dy), new mxPoint(x + w, y + h - dy),
 							new mxPoint(cx, y + h), new mxPoint(x, y + h - dy),
 							new mxPoint(x, y + dy), new mxPoint(cx, y)];
 		}
 		else
 		{
-			var dx = w * Math.max(0, Math.min(1, size));
+			var dx = (fixed) ? Math.max(0, Math.min(w, size)) : w * Math.max(0, Math.min(1, size));
 			points = [new mxPoint(x + dx, y), new mxPoint(x + w - dx, y), new mxPoint(x + w, cy),
 						new mxPoint(x + w - dx, y + h), new mxPoint(x + dx, y + h),
 						new mxPoint(x, cy), new mxPoint(x + dx, y)];
@@ -4054,7 +4058,7 @@
 				}, false)];
 			},
 			'step': createDisplayHandleFunction(StepShape.prototype.size, true, null, true, StepShape.prototype.fixedSize),
-			'hexagon': createDisplayHandleFunction(HexagonShape.prototype.size, true, 0.5, true),
+			'hexagon': createDisplayHandleFunction(HexagonShape.prototype.size, true, 0.5, true, HexagonShape.prototype.fixedSize),
 			'curlyBracket': createDisplayHandleFunction(CurlyBracketShape.prototype.size, false),
 			'display': createDisplayHandleFunction(DisplayShape.prototype.size, false),
 			'cube': createCubeHandleFunction(1, CubeShape.prototype.size, false),

+ 1 - 1
src/main/webapp/js/mxgraph/Sidebar.js

@@ -999,7 +999,7 @@ Sidebar.prototype.addGeneralPalette = function(expand)
 	 	this.createVertexTemplateEntry('shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;', 120, 60, '', 'Process', null, null, 'process task'),
 	 	this.createVertexTemplateEntry('rhombus;whiteSpace=wrap;html=1;', 80, 80, '', 'Diamond', null, null, 'diamond rhombus if condition decision conditional question test'),
 	 	this.createVertexTemplateEntry('shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;', 120, 60, '', 'Parallelogram'),
-	 	this.createVertexTemplateEntry('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;', 120, 80, '', 'Hexagon', null, null, 'hexagon preparation'),
+	 	this.createVertexTemplateEntry('shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;', 120, 80, '', 'Hexagon', null, null, 'hexagon preparation'),
 	 	this.createVertexTemplateEntry('triangle;whiteSpace=wrap;html=1;', 60, 80, '', 'Triangle', null, null, 'triangle logic inverter buffer'),
 	 	this.createVertexTemplateEntry('shape=cylinder;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;', 60, 80, '', 'Cylinder', null, null, 'cylinder data database'),
 	 	this.createVertexTemplateEntry('ellipse;shape=cloud;whiteSpace=wrap;html=1;', 120, 80, '', 'Cloud', null, null, 'cloud network'),

文件差异内容过多而无法显示
+ 364 - 360
src/main/webapp/js/viewer-static.min.js


文件差异内容过多而无法显示
+ 364 - 360
src/main/webapp/js/viewer.min.js


+ 1 - 0
src/main/webapp/resources/dia.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_am.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_ar.txt

@@ -672,6 +672,7 @@ shape=‫شكل‬
 shapes=‫الأشكال‬
 share=‫انشر‬
 shareLink=‫رابط للتحرير المنشور‬
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=‫حاد‬
 show=‫إظهار‬
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_bg.txt

@@ -672,6 +672,7 @@ shape=Форма
 shapes=Форми
 share=Споделяне
 shareLink=Линк за споделено редактиране
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Остро
 show=Показване
 showStartScreen=Показване на началния екран

+ 1 - 0
src/main/webapp/resources/dia_bn.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_bs.txt

@@ -672,6 +672,7 @@ shape=Oblik
 shapes=Oblici
 share=Podijeli
 shareLink=Link podijeljen za uređivanje
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Oštro
 show=Pokaži
 showStartScreen=Pokaži početni ekran

+ 1 - 0
src/main/webapp/resources/dia_ca.txt

@@ -672,6 +672,7 @@ shape=Forma
 shapes=Formes
 share=Comparteix
 shareLink=Enllaç per a l'edició compartida
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Angulós
 show=Mostra
 showStartScreen=Mostra la pantalla d'inici

+ 1 - 0
src/main/webapp/resources/dia_cs.txt

@@ -672,6 +672,7 @@ shape=Tvar
 shapes=Tvary
 share=Sdílet
 shareLink=Odkaz pro sdílenou editaci
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Ostrý
 show=Zobrazit
 showStartScreen=Zobrazit úvodní obrazovku

+ 1 - 0
src/main/webapp/resources/dia_da.txt

@@ -672,6 +672,7 @@ shape=Figur
 shapes=Figurer
 share=Del
 shareLink=Link til fælles redigering
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Skarp
 show=Vis
 showStartScreen=Vis Startskærm

+ 1 - 0
src/main/webapp/resources/dia_de.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Freigeben
 shareLink=Verknüpfung zum gemeinsamen Bearbeiten
+sharingAvailable=Freigabe nur für Google Drive und OneDrive Dateien.
 sharp=Eckig
 show=Anzeigen
 showStartScreen=Startbildschirm anzeigen

+ 1 - 0
src/main/webapp/resources/dia_el.txt

@@ -672,6 +672,7 @@ shape=Σχήμα
 shapes=Σχήματα
 share=Κοινοποίηση
 shareLink=Σύνδεσμός για κοινή επεξεργασία
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Αιχμή
 show=Προβολή
 showStartScreen=Εμφάνιση Οθόνης Έναρξης

+ 1 - 0
src/main/webapp/resources/dia_eo.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_es.txt

@@ -672,6 +672,7 @@ shape=Forma
 shapes=Formas
 share=Compartir
 shareLink=Enlace para edición compartida.
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Filoso
 show=Mostrar
 showStartScreen=Mostrar pantalla de inicio

+ 1 - 0
src/main/webapp/resources/dia_et.txt

@@ -672,6 +672,7 @@ shape=Kujund
 shapes=Kujundid
 share=Jaga
 shareLink=Link jagatud toimetamiseks
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Terav
 show=Näita
 showStartScreen=Näita algusekraani

+ 1 - 0
src/main/webapp/resources/dia_eu.txt

@@ -672,6 +672,7 @@ shape=Forma
 shapes=Formak
 share=Partekatu
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Zorrotza
 show=Erakutsi
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_fa.txt

@@ -672,6 +672,7 @@ shape=‫شکل‬
 shapes=‫اشکال‬
 share=‫به اشتراک گذاشتن‬
 shareLink=‫لینک برای ویرایش مشترک‬
+sharingAvailable=X
 sharp=‫تیز‬
 show=‫نشان دادن‬
 showStartScreen=‫نشان دادن صفحه شروع‬

+ 1 - 0
src/main/webapp/resources/dia_fi.txt

@@ -672,6 +672,7 @@ shape=Muoto
 shapes=Muodot
 share=Jaa
 shareLink=Linkki jaettuun muokkaukseen
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Terävä
 show=Näytä
 showStartScreen=Näytä aloitusruutu

+ 1 - 0
src/main/webapp/resources/dia_fil.txt

@@ -672,6 +672,7 @@ shape=Hugis
 shapes=Mga hugis
 share=Ibahagi
 shareLink=Link para sa salu-salong pag-edit
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Matalas
 show=Ipakita
 showStartScreen=Ipakita ang Panimulang Tabing

+ 1 - 0
src/main/webapp/resources/dia_fr.txt

@@ -672,6 +672,7 @@ shape=Forme
 shapes=Formes
 share=Partager
 shareLink=Lien pour l'édition partagée
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Dur
 show=Afficher
 showStartScreen=Montrer écran de démarrage

+ 1 - 0
src/main/webapp/resources/dia_gl.txt

@@ -672,6 +672,7 @@ shape=Forma
 shapes=Formas
 share=Compartir
 shareLink=Vencello para compartir edición
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Brusco
 show=Amosar
 showStartScreen=Amosar Pantalla de Inicio

+ 1 - 0
src/main/webapp/resources/dia_gu.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_he.txt

@@ -672,6 +672,7 @@ shape=‫צורה‬
 shapes=‫צורות‬
 share=‫שתף‬
 shareLink=‫קישור לעריכה משותפת‬
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=‫חד‬
 show=‫הצג‬
 showStartScreen=‫הצג מסך פתיחה‬

+ 1 - 0
src/main/webapp/resources/dia_hi.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_hr.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_hu.txt

@@ -672,6 +672,7 @@ shape=Alakzat
 shapes=Alakzatok
 share=Osztás
 shareLink=Link osztása
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Éles
 show=Mutat
 showStartScreen=Indító képernyőt jelenít

+ 1 - 0
src/main/webapp/resources/dia_i18n.txt

@@ -672,6 +672,7 @@ shape=shape
 shapes=shapes
 share=share
 shareLink=shareLink
+sharingAvailable=sharingAvailable
 sharp=sharp
 show=show
 showStartScreen=showStartScreen

+ 1 - 0
src/main/webapp/resources/dia_id.txt

@@ -672,6 +672,7 @@ shape=Bentuk
 shapes=Bentuk
 share=Bagikan
 shareLink=Tautan untuk editan bersama
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Tajam
 show=Tampilkan
 showStartScreen=Tampilkan Layar Awal

+ 1 - 0
src/main/webapp/resources/dia_it.txt

@@ -672,6 +672,7 @@ shape=Forma
 shapes=Forme
 share=Condividi
 shareLink=Link per la modifica condivisa
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Nitidezza
 show=Mostra
 showStartScreen=Mostra la schermata d'inizio

+ 1 - 0
src/main/webapp/resources/dia_ja.txt

@@ -672,6 +672,7 @@ shape=図形
 shapes=図形
 share=共有
 shareLink=共同編集リンク
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=シャープ
 show=表示
 showStartScreen=開始画面を表示します

+ 1 - 0
src/main/webapp/resources/dia_kn.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_ko.txt

@@ -672,6 +672,7 @@ shape=도형
 shapes=도형
 share=공유
 shareLink=편집 공유 링크
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=곧은선
 show=보이기
 showStartScreen=시작 화면 보기

+ 1 - 0
src/main/webapp/resources/dia_lt.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_lv.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_ml.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_mr.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_ms.txt

@@ -672,6 +672,7 @@ shape=Bentuk
 shapes=Bentuk-bentuk
 share=Kongsi
 shareLink=Pautan untuk suntingan kongsian
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Tajam
 show=Tunjuk
 showStartScreen=Tunjuk Skrin Mula

+ 1 - 0
src/main/webapp/resources/dia_my.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_nl.txt

@@ -672,6 +672,7 @@ shape=Vorm
 shapes=Vormen
 share=Delen
 shareLink=Link voor gedeeld bewerken
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Rechthoekig
 show=Tonen
 showStartScreen=Startscherm tonen

+ 1 - 0
src/main/webapp/resources/dia_no.txt

@@ -672,6 +672,7 @@ shape=Form
 shapes=Figurer
 share=Del
 shareLink=Lenke til felles redigering
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Skarp
 show=Vis
 showStartScreen=Vis startvindu

+ 1 - 0
src/main/webapp/resources/dia_pl.txt

@@ -672,6 +672,7 @@ shape=Kształt
 shapes=Kształty
 share=Udostępnij
 shareLink=Hiperłącze do umożliwienia edycji innym użytkownikom
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Ostry
 show=Pokaż
 showStartScreen=Pokaż ekran startowy

+ 1 - 0
src/main/webapp/resources/dia_pt-br.txt

@@ -672,6 +672,7 @@ shape=Formato
 shapes=Formatos
 share=Partilhar
 shareLink=Link para edição partilhada
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Quadrado
 show=Mostrar
 showStartScreen=Mostrar Tela Inicial

+ 1 - 0
src/main/webapp/resources/dia_pt.txt

@@ -672,6 +672,7 @@ shape=Forma 
 shapes=Formas
 share=Partilhar
 shareLink=Link para a edição partilhada
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Quadrado
 show=Mostrar
 showStartScreen=Mostrar Tela de Começo

+ 1 - 0
src/main/webapp/resources/dia_ro.txt

@@ -672,6 +672,7 @@ shape=Formă
 shapes=Forme
 share=Distribuie
 shareLink=Link pentru editare în comun
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Ascuţit
 show=Arată
 showStartScreen=Arată ecranul de pornire

+ 1 - 0
src/main/webapp/resources/dia_ru.txt

@@ -672,6 +672,7 @@ shape=Фигура
 shapes=Фигуры
 share=Общий доступ
 shareLink=Ссылка для совместного редактирования
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Острые углы
 show=Показать
 showStartScreen=Показать начальный экран

+ 1 - 0
src/main/webapp/resources/dia_si.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_sk.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_sl.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_sr.txt

@@ -672,6 +672,7 @@ shape=Oblik
 shapes=Oblici
 share=Podeli
 shareLink=Podeli link
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Oštar
 show=Prikaži
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_sv.txt

@@ -672,6 +672,7 @@ shape=Form
 shapes=Former
 share=Dela
 shareLink=Länk för delad redigering
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Skarp
 show=Visa
 showStartScreen=Visa hemskärmen

+ 1 - 0
src/main/webapp/resources/dia_sw.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_ta.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_te.txt

@@ -672,6 +672,7 @@ shape=Shape
 shapes=Shapes
 share=Share
 shareLink=Link for shared editing
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Sharp
 show=Show
 showStartScreen=Show Start Screen

+ 1 - 0
src/main/webapp/resources/dia_th.txt

@@ -672,6 +672,7 @@ shape=รูปร่าง
 shapes=รูปร่าง
 share=แบ่งปัน
 shareLink=เชื่อมต่อเพื่อการแก้ไขร่วมกัน
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=แหลม
 show=แสดง
 showStartScreen=แสดงหน้าจอเริ่มต้น

+ 1 - 0
src/main/webapp/resources/dia_tr.txt

@@ -672,6 +672,7 @@ shape=Şekil
 shapes=Şekiller
 share=Paylaş
 shareLink=Paylaşılan düzenleme linki
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Keskin 
 show=Göster
 showStartScreen=Başlama ekranını göster

+ 1 - 0
src/main/webapp/resources/dia_uk.txt

@@ -672,6 +672,7 @@ shape=Форма
 shapes=Форми
 share=Поділитися
 shareLink=Посилання для спільного редагування
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Різке
 show=Показати
 showStartScreen=Показати екран запуску

+ 1 - 0
src/main/webapp/resources/dia_vi.txt

@@ -672,6 +672,7 @@ shape=Hình
 shapes=Hình
 share=Chia sẻ
 shareLink=Đường dẫn chỉnh sửa đã chia sẻ
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=Góc
 show=Hiển thị
 showStartScreen=Hiển thị Màn Hình Bắt Đầu

+ 1 - 0
src/main/webapp/resources/dia_zh-tw.txt

@@ -672,6 +672,7 @@ shape=圖形
 shapes=圖形
 share=分享
 shareLink=分享編輯連結
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=銳角
 show=顯示
 showStartScreen=顯示開始畫面

+ 1 - 0
src/main/webapp/resources/dia_zh.txt

@@ -672,6 +672,7 @@ shape=形状
 shapes=形状
 share=共享
 shareLink=共享编辑的链接
+sharingAvailable=Sharing available for Google Drive and OneDrive files.
 sharp=锐利
 show=显示
 showStartScreen=显示开始画面

+ 60 - 60
src/main/webapp/service-worker.js

@@ -6,11 +6,11 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "319cc654d54a8737befada3433cd2c78"
+    "revision": "a8fa137840b7ae79e23008940db6f095"
   },
   {
     "url": "js/extensions.min.js",
-    "revision": "7e985a8c8ea46163d24e15c0177203ed"
+    "revision": "99a5699e7051a810fdee45e0fd91be93"
   },
   {
     "url": "js/stencils.min.js",
@@ -34,7 +34,7 @@ if (workbox)
   },
   {
     "url": "styles/grapheditor.css",
-    "revision": "6ca3b89237f1c6cb9cfcbd3032b43431"
+    "revision": "35b5b9d556faa375612c04addcd5819c"
   },
   {
     "url": "styles/atlas.css",
@@ -62,231 +62,231 @@ if (workbox)
   },
   {
     "url": "resources/dia.txt",
-    "revision": "1ec12a0dd13b43b8d7f380cd1bf6b9ad"
+    "revision": "27d259545a1519fb23cbec0f7360c9ce"
   },
   {
     "url": "resources/dia_cs.txt",
-    "revision": "06c1109d996b1dad062b05c771a61920"
+    "revision": "5b06409cae80df1fb4db967a43198db8"
   },
   {
     "url": "resources/dia_my.txt",
-    "revision": "1ec12a0dd13b43b8d7f380cd1bf6b9ad"
+    "revision": "27d259545a1519fb23cbec0f7360c9ce"
   },
   {
     "url": "resources/dia_am.txt",
-    "revision": "1a122f299214bc6fc0cf300270f6d869"
+    "revision": "8e270ea2a00eec62ed3056d8b173a343"
   },
   {
     "url": "resources/dia_ml.txt",
-    "revision": "97631cb2737b0e746b7f8ecc8941c727"
+    "revision": "6c6f33d1dafa9ad1763f8a0e1c77d9ea"
   },
   {
     "url": "resources/dia_uk.txt",
-    "revision": "1a825bf39d1c36c2fa9b2ab48fd2e9e3"
+    "revision": "31f1c8f4b0f4c7f247e2e4575ed049a7"
   },
   {
     "url": "resources/dia_bg.txt",
-    "revision": "630a27fef0624423314d0926df57d5d4"
+    "revision": "205118129e8df0dc956285fcb6e13de7"
   },
   {
     "url": "resources/dia_ca.txt",
-    "revision": "fa1bf307f00d923528574ea211dd227a"
+    "revision": "35b6a1ad89db2335060404dc242678ca"
   },
   {
     "url": "resources/dia_th.txt",
-    "revision": "3ad389e87a0e85681d6d8e2202ff7908"
+    "revision": "2cd2be36fdf3465b7665ce13bc0322aa"
   },
   {
     "url": "resources/dia_bs.txt",
-    "revision": "3466869f2e29324c2b3bf55081826454"
+    "revision": "a2616c76f9c6249a4f78a53a1cfd8891"
   },
   {
     "url": "resources/dia_id.txt",
-    "revision": "25b23ac9f923266cd1182fe39923ad47"
+    "revision": "e6a5f79703ae2c8d0e4b23375c19975a"
   },
   {
     "url": "resources/dia_sk.txt",
-    "revision": "8e3c3fbfa22dc7ddb97965e8deed2c4a"
+    "revision": "5d687f54cd8ee2061387af6f4cfe4fcf"
   },
   {
     "url": "resources/dia_ro.txt",
-    "revision": "b80c03fd6a1057df2049c953ce75c8c1"
+    "revision": "a6697aaa230a97fd286a4f0aaa0727db"
   },
   {
     "url": "resources/dia_gl.txt",
-    "revision": "a742a45372dafe715d15132779e2b375"
+    "revision": "c88b2f76aeaa3138ade917bc399c98a8"
   },
   {
     "url": "resources/dia_es.txt",
-    "revision": "72bb27405fb620dbc9fff23cae9ab785"
+    "revision": "15ab7e88a09d87498a4b6d048353eb34"
   },
   {
     "url": "resources/dia_eu.txt",
-    "revision": "6b8bd23addfe2c3d39e09bf378d83074"
+    "revision": "ba5bb8c3bd6a492e3b45b69e9a4cf6bd"
   },
   {
     "url": "resources/dia_ko.txt",
-    "revision": "0128304941e2bacfc3a1c5e13647de5d"
+    "revision": "da301eab521972967e51a5453fde6cb5"
   },
   {
     "url": "resources/dia_si.txt",
-    "revision": "1ec12a0dd13b43b8d7f380cd1bf6b9ad"
+    "revision": "27d259545a1519fb23cbec0f7360c9ce"
   },
   {
     "url": "resources/dia_kn.txt",
-    "revision": "06cfad9581f1e9dacd9eb5b9e8a927ba"
+    "revision": "f1cc8799dbfe7883329b037a632aa96e"
   },
   {
     "url": "resources/dia_hu.txt",
-    "revision": "4da4e966274427f93c1ffa0fbb62a131"
+    "revision": "0366546206854c2f3b53fbc2c1da106b"
   },
   {
     "url": "resources/dia_fi.txt",
-    "revision": "6d3b18a576cb038a0bb7f6d8b2203d1c"
+    "revision": "736f51f7280ec763d7d8f69a2e2caf72"
   },
   {
     "url": "resources/dia_da.txt",
-    "revision": "31e166718131d82495b1fcbea5eaa13d"
+    "revision": "5ef39ca0106a36a0c3fe2039aa78d8bd"
   },
   {
     "url": "resources/dia_de.txt",
-    "revision": "c758942c6cf34797186db837c73f62fc"
+    "revision": "944822c5ff72d5fdcda8954ba7da66e2"
   },
   {
     "url": "resources/dia_sl.txt",
-    "revision": "a0ba7ed84175d151fb1aed287cfc688d"
+    "revision": "69599e42b93790a257b3b108cc5afc6c"
   },
   {
     "url": "resources/dia_it.txt",
-    "revision": "5eb7f89a1f2d470c54af6a631df49e4a"
+    "revision": "8921764a2b7fad5602adc21e64a5ac2c"
   },
   {
     "url": "resources/dia_hr.txt",
-    "revision": "7d098875272b5ebc2f8cc34429ad2d8a"
+    "revision": "7a245f1d5410c0aec61dd838a1fbac30"
   },
   {
     "url": "resources/dia_he.txt",
-    "revision": "8d42d60f44ceae0e2c98e7db877e0b0e"
+    "revision": "89dfe0393507de57306bc533b09a7162"
   },
   {
     "url": "resources/dia_pt.txt",
-    "revision": "481877838da3c834ea62a666b9cb60a7"
+    "revision": "6592ba85798cc4e975d84939eaf2892f"
   },
   {
     "url": "resources/dia_zh-tw.txt",
-    "revision": "2ebb56adc00cf11923807fbcef5ecf66"
+    "revision": "d2539f7b1fbd103087202bd3123d897e"
   },
   {
     "url": "resources/dia_et.txt",
-    "revision": "86aeccdd67fe3c30e6648c0f11b3ac34"
+    "revision": "e7bb4f0421d8e5c243ecdbf84a2164de"
   },
   {
     "url": "resources/dia_ja.txt",
-    "revision": "e3b2828c0c6907655d8a7456a11dec84"
+    "revision": "290c8c8cf18bbade8db53b61a5b2f621"
   },
   {
     "url": "resources/dia_hi.txt",
-    "revision": "3923df3b657d8b0c57e2748d95dd1570"
+    "revision": "b775a5584628174079d451e431399eb3"
   },
   {
     "url": "resources/dia_eo.txt",
-    "revision": "fade58d52b126e3a8b40e7a004f9db80"
+    "revision": "8b6ce98e046bd84c5bdd760567e8d122"
   },
   {
     "url": "resources/dia_fa.txt",
-    "revision": "6ccdc8b9382d820ff4e3a1f94344f4b8"
+    "revision": "dbf6176fc59f0f80725d8ca386d4bd7c"
   },
   {
     "url": "resources/dia_sw.txt",
-    "revision": "da1651246e84f1a54c0b83611a9a73ec"
+    "revision": "a433ab4b602e23136d8307ed0ae08aea"
   },
   {
     "url": "resources/dia_pl.txt",
-    "revision": "c803cb9d37d0a40e7805a51af61f3d53"
+    "revision": "193eb613e1cab6b1f9e64ff65a85e6d7"
   },
   {
     "url": "resources/dia_pt-br.txt",
-    "revision": "578125b9508f38fdb7b9123c5d7b325f"
+    "revision": "0309a91a9f59afa320b5e7cd00e321ab"
   },
   {
     "url": "resources/dia_sv.txt",
-    "revision": "e6d546be7ad01b4874771a6a9bcf6999"
+    "revision": "e42b8f7023416170ecb52ca4690925f1"
   },
   {
     "url": "resources/dia_el.txt",
-    "revision": "dca71bd35edd43717e61c5f86bc5738f"
+    "revision": "05c8cae5b44a635d63bbd802fce54461"
   },
   {
     "url": "resources/dia_sr.txt",
-    "revision": "460007c43fded3f0d7fe175d3df8f26b"
+    "revision": "219552d03be1a6852f09d5194795034c"
   },
   {
     "url": "resources/dia_fr.txt",
-    "revision": "e0fe5b4a4cfd300747e2458c1eac57a6"
+    "revision": "5ab266f4cfadfefd0961ad38cd9cfbd9"
   },
   {
     "url": "resources/dia_ru.txt",
-    "revision": "a2f77277acb7a9abca0be8cfcb6e78b5"
+    "revision": "9ef9ef97ff682cd1be8e7f7532f54b1c"
   },
   {
     "url": "resources/dia_gu.txt",
-    "revision": "a56c935f2e0f4465456c587abde38612"
+    "revision": "bff8275e7576dbad9cec254aaa984dda"
   },
   {
     "url": "resources/dia_ar.txt",
-    "revision": "b754b0206f8c0ef01730e417f0fa4490"
+    "revision": "17819885a1e96766a80d7ea95fe92402"
   },
   {
     "url": "resources/dia_tr.txt",
-    "revision": "9669902495e40a08e814a76a5b43e55f"
+    "revision": "4465c048e1310af4e0bd07fc96144590"
   },
   {
     "url": "resources/dia_te.txt",
-    "revision": "4e858034bc8bc1ce2025f988d614bf6e"
+    "revision": "358f9f49641432b8b08a9865b098b765"
   },
   {
     "url": "resources/dia_lt.txt",
-    "revision": "3bc2f077588dda41cbd59c4177af6524"
+    "revision": "b521e91ade6f51790cc522703097c93c"
   },
   {
     "url": "resources/dia_lv.txt",
-    "revision": "9cc27e78ab552a3923ace242b08cc5f8"
+    "revision": "0692d5056e41a364defe7a9e874667ab"
   },
   {
     "url": "resources/dia_mr.txt",
-    "revision": "ad00ca68e1fdb634a86a2eff13c02cce"
+    "revision": "74f5f13d5328ad08891f287a216b2b25"
   },
   {
     "url": "resources/dia_ms.txt",
-    "revision": "9836aa97e4f4ca206eb0b244496cb44b"
+    "revision": "d1d4a4304760f021d14ae78d4c63c7ba"
   },
   {
     "url": "resources/dia_nl.txt",
-    "revision": "92fa763a7fd00e53042b6a25935108c6"
+    "revision": "1eafabf4cc207df9d56d263f107db94c"
   },
   {
     "url": "resources/dia_fil.txt",
-    "revision": "29d5ab8f9f37afc217dbe2667d11ba52"
+    "revision": "0b519f89bea709a535a4b324ab2d4d0e"
   },
   {
     "url": "resources/dia_zh.txt",
-    "revision": "bceb1463e5553ba0a9fc41b46e5766e2"
+    "revision": "52cdaffa00947dc3d6fef9f3469cc532"
   },
   {
     "url": "resources/dia_bn.txt",
-    "revision": "26a8dbbd11d8ef8340f333701816957b"
+    "revision": "e9ac087d108743305398c1161eb81549"
   },
   {
     "url": "resources/dia_no.txt",
-    "revision": "8bfea6e400b8dea4801baa9a5a7fcc02"
+    "revision": "7ed3af9c4b4024168069dedc96c4c26b"
   },
   {
     "url": "resources/dia_vi.txt",
-    "revision": "c1de0ba62ec390bc459c267e5ee73b07"
+    "revision": "928311f19eaf8a634720389e4e2ff489"
   },
   {
     "url": "resources/dia_ta.txt",
-    "revision": "0e4e12b9042c9ba41a69897e9771c691"
+    "revision": "022f9360053e669c9d1d03b87a84a5a7"
   },
   {
     "url": "favicon.ico",

+ 13 - 3
src/main/webapp/styles/grapheditor.css

@@ -93,9 +93,19 @@
 	color:#a94442 !important;
 	border-radius:3px;
 }
-.geStatusAlert:hover {
-	background-color:#f1d8d8;
-	border-color:#d6b2b8;
+.geStatusAlertOrange {
+	white-space:nowrap;
+	margin-top:-5px;
+	font-size:12px;
+	padding:4px 6px 4px 6px;
+	background-color:rgb(242, 147, 30);
+	border:rgb(240, 135, 5);
+	color:#000000 !important;
+	border-radius:3px;
+	opacity:0.8;
+}
+.geStatusAlertOrange:hover {
+	opacity:1;
 }
 .geStatusMessage {
 	white-space:nowrap;

+ 32 - 0
src/main/webapp/vsdxImporter.html

@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>VSDX Importer</title>
+<script type="text/javascript" src="js/app.min.js"></script>
+<script type="text/javascript" src="js/extensions.min.js"></script>
+<script type="text/javascript">
+	const { ipcRenderer } = require('electron');
+	
+	ipcRenderer.on('import', (event, vsdxBuff) => 
+	{
+		EditorUi.prototype.createUi = function(){};
+		EditorUi.prototype.addTrees = function(){};
+		EditorUi.prototype.updateActionStates = function(){};
+	 	var editorUi = new EditorUi();
+	 	var blob =  new Blob([vsdxBuff], {type: 'application/octet-stream'});
+	 	
+	 	editorUi.importVisio(blob, function(xml)
+		{
+	 		ipcRenderer.send('import-success', xml);
+		},
+		function()
+		{
+			ipcRenderer.send('import-error');
+		});
+	});
+</script>
+</head>
+<body>
+</body>
+</html>