Bladeren bron

8.2.1 release

Gaudenz Alder 7 jaren geleden
bovenliggende
commit
169f2b1adf

+ 24 - 0
ChangeLog

@@ -1,3 +1,27 @@
+16-FEB-2018: 8.2.1
+
+- Adds shape group in Misc section, outline connect
+- Fixes line wrapping, hides icons while editing
+- Preserves library order for clibs parameter
+- Uses mxGraph 3.9.2 beta 9
+
+16-FEB-2018: 8.2.0
+
+- Confluence Cloud attachment fixes
+
+16-FEB-2018: 8.1.9
+
+- Fixes Google API load timing issues
+- Fixes attachment write calls for IE and Edge in Confluence Cloud
+
+14-FEB-2018: 8.1.8
+
+- Fixes saving diagram to Confluence Cloud draft pages
+
+14-FEB-2018: 8.1.7
+
+- Fixes custom style path for atlas.css
+
 14-FEB-2018: 8.1.6
 
 - Fixes block resize in graph viewer

+ 1 - 1
VERSION

@@ -1 +1 @@
-8.1.6
+8.2.1

File diff suppressed because it is too large
+ 94 - 94
etc/mxgraph/mxClient.js


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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 02/14/2018 11:41 AM
+# 02/16/2018 01:45 PM
 
 app.html
 index.html?offline=1

+ 33 - 94
src/main/webapp/connect/confluence/ac.js

@@ -12,7 +12,7 @@ AC.autoExit = true;
 // Last Checked on 08-AUG-2017: No delete scope needed to delete drafts
 // LATER: If delete scope is needed users must upgrade to the latest json
 // Disabled. Flag to mute notifications for drafts is needed. 16-AUG-2017
-AC.draftEnabled = true; //Enabled with the new save that mute notifications for saving TODO is there notification for deleting a draft?
+AC.draftEnabled = false;
 
 AC.getUrlParam = function(param, escape, url){
     try{
@@ -30,32 +30,6 @@ AC.getMetaTag = function(name) {
 	return document.getElementsByTagName('meta')[name].getAttribute('content');
 }
 
-//Code from: https://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript
-AC.b64toBlob = function(b64Data, contentType, sliceSize, isByteCharacters) 
-{
-	  contentType = contentType || '';
-	  sliceSize = sliceSize || 512;
-
-	  var byteCharacters = isByteCharacters? b64Data : atob(b64Data);
-	  var byteArrays = [];
-
-	  for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
-	    var slice = byteCharacters.slice(offset, offset + sliceSize);
-
-	    var byteNumbers = new Array(slice.length);
-	    for (var i = 0; i < slice.length; i++) {
-	      byteNumbers[i] = slice.charCodeAt(i);
-	    }
-
-	    var byteArray = new Uint8Array(byteNumbers);
-
-	    byteArrays.push(byteArray);
-	  }
-
-	  var blob = new Blob(byteArrays, {type: contentType});
-	  return blob;
-  }
-
 AC.initAsync = function(baseUrl)
 {
 	var link = document.createElement('a');
@@ -100,6 +74,7 @@ AC.initAsync = function(baseUrl)
 	var filename = null;
 	var theMacroData = null;
 	var pageId = null;
+	var draftPage = false;
 	var theLocation = null;
 	var attachments = null;
 
@@ -120,7 +95,7 @@ AC.initAsync = function(baseUrl)
 	{
 		if (initReceived && xmlReceived != null && draftHandled && !waitingForAttachments)
 		{
-			AC.init(baseUrl, theLocation, pageId, editor, filename, xmlReceived, draftName, draftXml, theMacroData);
+			AC.init(baseUrl, theLocation, pageId, editor, filename, xmlReceived, draftName, draftXml, theMacroData, draftPage);
 		}
 	};
 	
@@ -242,6 +217,7 @@ AC.initAsync = function(baseUrl)
 			    	if (data != null && data.target != null && data.context!= null &&
 			    		(data.target == 'contentedit' || data.target == 'contentcreate'))
 			    	{
+			    		draftPage = (data.target == 'contentcreate');
 			    		pageId = data.context.contentId;
 			    	}
 
@@ -409,7 +385,7 @@ AC.initAsync = function(baseUrl)
 	});
 };
 
-AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, draftName, draftXml, macroData)
+AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, draftName, draftXml, macroData, draftPage)
 {
 	// Hides the logo
 	document.body.style.backgroundImage = 'none';
@@ -442,7 +418,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 	   		//console.trace('DRAFT: Save', draftName, xml);
 	   		
 			AC.saveDiagram(pageId, draftName,
-				xml,
+				btoa(unescape(encodeURIComponent(xml))),
 				function(res)
 				{
 					var obj = null;
@@ -496,7 +472,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 							err(obj);
 						}
 					}
-				}, false, 'text/plain', 'Created by Draw.io');
+				}, false, 'text/plain', 'Created by Draw.io', false, draftPage);
 	   	};
 	   	
 		function showTemplateDialog()
@@ -959,7 +935,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 				}
 				else if (drawMsg.event == 'save')
 				{
-					diagramXml = drawMsg.xml;
+					diagramXml = btoa(unescape(encodeURIComponent(drawMsg.xml)));
 					
 					if (diagramName == null)
 					{
@@ -1051,10 +1027,9 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 
 						// LATER: Get revision from metadata of attachment and check
 						// what condition makes the response not contain an URL
-						//TODO Is prev comment still needed with REST API?
-						if (resp != null && resp.results != null && resp.results[0])
+						if (resp != null && resp.url != null)
 						{
-							revision = resp.results[0].version.number;
+							revision = resp.url.match(/version=(\d+)/i)[1];
 						}
 						else
 						{
@@ -1115,7 +1090,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 
 						if (diagramName != null) 
 						{
-							AC.saveDiagram(pageId, diagramName + '.png', AC.b64toBlob(imageData, 'image/png'),
+							AC.saveDiagram(pageId, diagramName + '.png', imageData,
 								successPng, saveError, false, 'image/png');
 						}
 					};
@@ -1126,7 +1101,7 @@ AC.init = function(baseUrl, location, pageId, editor, diagramName, initialXml, d
 							show: true, messageKey: 'saving'}), '*');
 						
 						AC.saveDiagram(pageId, diagramName, diagramXml,
-							successXml, saveError, false, 'text/plain');
+							successXml, saveError, false, 'text/plain', 'draw.io diagram', false, draftPage);
 					}
 				}
 			}
@@ -1183,9 +1158,17 @@ AC.loadDiagram = function (pageId, diagramName, revision, success, error, owning
 	});
 };
 
-//TODO We can upload both the diagram and its png in one call if needed?
-AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mime, comment, sendNotif) 
+AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mime, comment) 
 {
+	var attachment = {fileName: diagramName, contentType: mime};
+	
+	if (comment != null)
+	{
+		attachment.comment = comment;
+	}
+	
+	var params = [pageId, attachment, xml];
+	
 	loadSucess = function(resp) 
 	{
 		error({status: 409, message: 'File already exists'});
@@ -1209,7 +1192,7 @@ AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mim
 		{
 			var obj = JSON.parse(responseText);
 			
-			if (obj != null && obj.code == -32600) //TODO is the codes the same with new REST APIs 
+			if (obj != null && obj.code == -32600)
 			{
 				error({status: 401});
 				
@@ -1222,25 +1205,19 @@ AC.saveDiagram = function(pageId, diagramName, xml, success, error, newSave, mim
 	
 	doSave = function() 
 	{
+		// Workaround for encoding problems
+		var data = JSON.stringify(params);
+
 		AP.require(['request'], function(request) 
 		{
-			 var blob = (xml instanceof Blob)? xml : new Blob([xml], {type: mime});
-			 var attFile = new File([blob], diagramName);
-			 var reqData = {file: attFile, minorEdit: sendNotif? false : true};
-			 
-			 if (comment != null)
-			 {
-				 reqData.comment = comment;
-			 }
-			 
-			 request({
-				type: 'PUT',
-				data: reqData,
-				url:  "/rest/api/content/"+ pageId +"/child/attachment",
-				contentType: "multipart/form-data",
+			request({
+				type: 'POST',
+				data: data,
+				url: '/rpc/json-rpc/confluenceservice-v2/addAttachment',
+				contentType: 'application/json;charset=UTF-8',
 				success: sessionCheck,
 				error: error
-			 });
+			});
 		});
 	};
 	
@@ -1296,42 +1273,4 @@ AC.getMacroData = function(fn) {
 	AP.require('confluence', function(confluence) {
 		confluence.getMacroData(fn);
 	});
-}
-
-//From mxUtils
-AC.htmlEntities = function(s, newline)
-{
-	s = String(s || '');
-	
-	s = s.replace(/&/g,'&amp;'); // 38 26
-	s = s.replace(/"/g,'&quot;'); // 34 22
-	s = s.replace(/\'/g,'&#39;'); // 39 27
-	s = s.replace(/</g,'&lt;'); // 60 3C
-	s = s.replace(/>/g,'&gt;'); // 62 3E
-
-	if (newline == null || newline)
-	{
-		s = s.replace(/\n/g, '&#xa;');
-	}
-	
-	return s;
-};
-
-AC.fromHtmlEntities = function(s, newline)
-{
-	s = String(s || '');
-	
-	s = s.replace(/&amp;/g,'&'); // 38 26
-	s = s.replace(/&quot;/g,'"'); // 34 22
-	s = s.replace(/&#39;/g,'\\'); // 39 27
-	s = s.replace(/&lt;/g,'<'); // 60 3C
-	s = s.replace(/&gt;/g,'>'); // 62 3E
-
-	if (newline == null || newline)
-	{
-		s = s.replace(/&#xa;/g, '\n');
-	}
-	
-	return s;
-};
-
+}

+ 1 - 1
src/main/webapp/connect/confluence/connect.json

@@ -24,7 +24,7 @@
                 "key": "gliffyImport",
                 "url": "/connect/confluence/admin.html",
                 "name": {
-                    "value": "Draw.io Import Service"
+                    "value": "Gliffy - draw.io Conversion"
                 }
             }
 		],

+ 1 - 1
src/main/webapp/connect/confluence/viewer2.html

@@ -331,7 +331,7 @@ if (lang != null)
 											script.onload = function()
 											{
 												//save diagram
-												AC.saveDiagram(retryParams.pageId, name, xml,
+												AC.saveDiagram(retryParams.pageId, name, btoa(unescape(encodeURIComponent(xml))),
 												function()
 												{
 													//nothing!

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


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


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


+ 106 - 45
src/main/webapp/js/diagramly/App.js

@@ -291,7 +291,7 @@ App.getStoredMode = function()
 							window.location.hash == '') || (window.location.hash != null &&
 							window.location.hash.substring(0, 2) == '#G'))
 						{
-							mxscript('https://apis.google.com/js/api.js', null, null, null, mxClient.IS_SVG);
+							mxscript('https://apis.google.com/js/api.js');
 						}
 						// Keeps lazy loading for fallback to authenticated Google file if not public in loadFile
 						else if (urlParams['chrome'] == '0' && (window.location.hash == null ||
@@ -3654,19 +3654,61 @@ App.prototype.restoreLibraries = function()
 			delete this.pendingLibraries[id];
 		});
 				
-		var load = mxUtils.bind(this, function(libs)
+		var load = mxUtils.bind(this, function(libs, done)
 		{
+			var waiting = 0;
+			var files = [];
+
+			// Loads in order of libs array
+			var checkDone = mxUtils.bind(this, function()
+			{
+				if (waiting == 0)
+				{
+					for (var i = libs.length - 1; i >= 0; i--)
+					{
+						if (files[i] != null)
+						{
+							this.loadLibrary(files[i]);
+						}
+					}
+					
+					if (done != null)
+					{
+						done();
+					}
+				}
+			});
+			
 			if (libs != null)
 			{
 				for (var i = 0; i < libs.length; i++)
 				{
 					var name = encodeURIComponent(decodeURIComponent(libs[i]));
 					
-					(mxUtils.bind(this, function(id)
+					(mxUtils.bind(this, function(id, index)
 					{
 						if (id != null && id.length > 0 && this.pendingLibraries[id] == null &&
 							this.sidebar.palettes[id] == null)
 						{
+							// Waits for all libraries to load
+							waiting++;
+							
+							var onload = mxUtils.bind(this, function(file)
+							{
+
+								delete this.pendingLibraries[id];
+								files[index] = file;
+								waiting--;
+								checkDone();
+							});
+							
+							var onerror = mxUtils.bind(this, function()
+							{
+								ignore(id);
+								waiting--;
+								checkDone();
+							});
+							
 							this.pendingLibraries[id] = true;
 							var service = id.substring(0, 1);
 							
@@ -3674,30 +3716,35 @@ App.prototype.restoreLibraries = function()
 							{
 								if (isLocalStorage || mxClient.IS_CHROMEAPP)
 								{
-									try
+									// Make asynchronous for barrier to work
+									window.setTimeout(mxUtils.bind(this, function()
 									{
-										var name = decodeURIComponent(id.substring(1));
-										var xml = this.getLocalData(name, mxUtils.bind(this, function(xml)
+										try
 										{
-											if (name == '.scratchpad' && xml == null)
-											{
-												xml = this.emptyLibraryXml;
-											}
+											var name = decodeURIComponent(id.substring(1));
 											
-											if (xml != null)
+											var xml = this.getLocalData(name, mxUtils.bind(this, function(xml)
 											{
-												this.loadLibrary(new StorageLibrary(this, xml, name));
-											}
-											else
-											{
-												ignore(id);
-											}
-										}));
-									}
-									catch (e)
-									{
-										ignore(id);
-									}
+												if (name == '.scratchpad' && xml == null)
+												{
+													xml = this.emptyLibraryXml;
+												}
+												
+												if (xml != null)
+												{
+													onload(new StorageLibrary(this, xml, name));
+												}
+												else
+												{
+													onerror();
+												}
+											}));
+										}
+										catch (e)
+										{
+											onerror();
+										}
+									}), 0);
 								}
 							}
 							else if (service == 'U')
@@ -3714,29 +3761,35 @@ App.prototype.restoreLibraries = function()
 										realUrl = PROXY_URL + '?url=' + encodeURIComponent(url) + '&' + nocache;
 									}
 									
-									// Uses proxy to avoid CORS issues
-									mxUtils.get(realUrl, mxUtils.bind(this, function(req)
+									try
 									{
-										if (req.getStatus() >= 200 && req.getStatus() <= 299)
+										// Uses proxy to avoid CORS issues
+										mxUtils.get(realUrl, mxUtils.bind(this, function(req)
 										{
-											try
+											if (req.getStatus() >= 200 && req.getStatus() <= 299)
 											{
-												this.loadLibrary(new UrlLibrary(this, req.getText(), url));
-												delete this.pendingLibraries[id];
+												try
+												{
+													onload(new UrlLibrary(this, req.getText(), url));
+												}
+												catch (e)
+												{
+													onerror();
+												}
 											}
-											catch (e)
+											else
 											{
-												ignore(id);
+												onerror();
 											}
-										}
-										else
+										}), function()
 										{
-											ignore(id);
-										}
-									}), function()
+											onerror();
+										});
+									}
+									catch (e)
 									{
-										ignore(id);
-									});
+										onerror();
+									}
 								}
 							}
 							else
@@ -3785,31 +3838,39 @@ App.prototype.restoreLibraries = function()
 									{
 										try
 										{
-											this.loadLibrary(file);
-											delete this.pendingLibraries[id];
+											onload(file);
 										}
 										catch (e)
 										{
-											ignore(id);
+											onerror();
 										}
 									}), function(resp)
 									{
-										ignore(id);
+										onerror();
 									});
 								}
 								else
 								{
 									delete this.pendingLibraries[id];
+									onerror();
 								}
 							}
 						}
-					}))(name);
+					}))(name, i);
 				}
+				
+				checkDone();
+			}
+			else
+			{
+				checkDone();
 			}
 		});
 		
-		load(mxSettings.getCustomLibraries());
-		load((urlParams['clibs'] || '').split(';'));
+		load(mxSettings.getCustomLibraries(), function()
+		{
+			load((urlParams['clibs'] || '').split(';'));
+		});
 	}
 };
 

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

@@ -284,7 +284,7 @@ DriveClient.prototype.execute = function(fn)
 					
 					if (!this.ui.isOffline())
 					{
-						this.logEvent({category: 'Error', action: 'open', label: resp.error.message})
+						this.ui.logEvent({category: 'Error', action: 'open', label: resp.error.message})
 					}
 				}
 				

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

@@ -2297,7 +2297,7 @@
     {
 	    	if (uiTheme == 'atlas')
 	    	{
-	    		mxClient.link('stylesheet', 'styles/atlas.css');
+	    		mxClient.link('stylesheet', STYLE_PATH + '/atlas.css');
 
 	    		if (typeof Toolbar !== 'undefined')
 	    		{
@@ -2316,7 +2316,7 @@
 	    	}
 	    	else if (uiTheme == 'dark')
 	    	{
-	    		mxClient.link('stylesheet', 'styles/dark.css');
+	    		mxClient.link('stylesheet', STYLE_PATH + '/dark.css');
 
 			Dialog.backdropColor = '#2a2a2a';
 	    		Graph.prototype.defaultThemeName = 'darkTheme';

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

@@ -4,7 +4,7 @@
 	{
 		var w = 0.5;
 		var h = 0.5;
-		var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;aspect=fixed;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;strokeColor=none;shape=mxgraph.citrix.';
+		var s = mxConstants.STYLE_VERTICAL_LABEL_POSITION + '=bottom;aspect=fixed;html=1;' + mxConstants.STYLE_VERTICAL_ALIGN + '=top;strokeColor=none;outlineConnect=0;shape=mxgraph.citrix.';
 		var gn = 'mxgraph.citrix';
 		var dt = '';
 		

+ 20 - 20
src/main/webapp/js/diagramly/sidebar/Sidebar-Office.js

@@ -17,8 +17,8 @@
 	
 	Sidebar.prototype.addOfficeCloudsPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.clouds.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.clouds.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;outlineConnect=0;verticalAlign=top;shape=mxgraph.office.clouds.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;outlineConnect=0;verticalAlign=top;shape=mxgraph.office.clouds.';
 
 		// Space savers
 		var sb = this;
@@ -69,8 +69,8 @@
 
 	Sidebar.prototype.addOfficeCommunicationsPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.communications.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.communications.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.communications.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.communications.';
 
 		// Space savers
 		var sb = this;
@@ -237,8 +237,8 @@
 
 	Sidebar.prototype.addOfficeConceptsPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.concepts.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.concepts.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.concepts.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.concepts.';
 
 		// Space savers
 		var sb = this;
@@ -543,8 +543,8 @@
 
 	Sidebar.prototype.addOfficeDatabasesPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.databases.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.databases.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.databases.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.databases.';
 
 		// Space savers
 		var sb = this;
@@ -659,8 +659,8 @@
 	
 	Sidebar.prototype.addOfficeDevicesPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.devices.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.devices.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.devices.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.devices.';
 
 		// Space savers
 		var sb = this;
@@ -785,8 +785,8 @@
 	
 	Sidebar.prototype.addOfficeSecurityPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.security.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.security.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.security.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.security.';
 
 		// Space savers
 		var sb = this;
@@ -915,8 +915,8 @@
 	
 	Sidebar.prototype.addOfficeServersPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.servers.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.servers.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.servers.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.servers.';
 
 		// Space savers
 		var sb = this;
@@ -1135,8 +1135,8 @@
 	
 	Sidebar.prototype.addOfficeServicesPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.services.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.services.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.services.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.services.';
 
 		// Space savers
 		var sb = this;
@@ -1213,8 +1213,8 @@
 	
 	Sidebar.prototype.addOfficeSitesPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.sites.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.sites.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.sites.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.sites.';
 
 		// Space savers
 		var sb = this;
@@ -1283,8 +1283,8 @@
 	
 	Sidebar.prototype.addOfficeUsersPalette = function()
 	{
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.users.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.office.users.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#505050;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.users.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.office.users.';
 
 		// Space savers
 		var sb = this;

+ 3 - 3
src/main/webapp/js/diagramly/sidebar/Sidebar-Rack.js

@@ -3,8 +3,8 @@
 	// Adds Rack shapes
 	Sidebar.prototype.addRackGeneralPalette = function()
 	{
-		var s = 'strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;shadow=0;dashed=0;';
-		var sr = 'strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;fillColor=#ffffff;';
+		var s = 'strokeColor=#666666;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;outlineConnect=0;shadow=0;dashed=0;';
+		var sr = 'strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;fillColor=#ffffff;outlineConnect=0;';
 		
 		//default tags
 		var dt = 'rack equipment ';
@@ -38,7 +38,7 @@
 	
 	Sidebar.prototype.addRackF5Palette = function()
 	{
-		var sr = 'strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;fillColor=#ffffff;';
+		var sr = 'strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;fillColor=#ffffff;outlineConnect=0;';
 		
 		//default tags
 		var dt = 'rack equipment ';

+ 6 - 6
src/main/webapp/js/diagramly/sidebar/Sidebar-Veeam.js

@@ -9,9 +9,9 @@
 	
 	Sidebar.prototype.addVeeam2DPalette = function()
 	{
-		var sn = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.2d.';
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.2d.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#EF8F21;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.2d.';
+		var sn = 'shadow=0;dashed=0;html=1;strokeColor=none;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.2d.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.2d.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#EF8F21;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.2d.';
 
 		// Space savers
 		var sb = this;
@@ -316,9 +316,9 @@
 
 	Sidebar.prototype.addVeeam3DPalette = function()
 	{
-		var sn = 'shadow=0;dashed=0;html=1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.3d.';
-		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.3d.';
-		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#EF8F21;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.veeam.3d.';
+		var sn = 'shadow=0;dashed=0;html=1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.3d.';
+		var s = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#4495D1;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.3d.';
+		var s2 = 'shadow=0;dashed=0;html=1;strokeColor=none;fillColor=#EF8F21;labelPosition=center;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;shape=mxgraph.veeam.3d.';
 
 		// Space savers
 		var sb = this;

+ 61 - 58
src/main/webapp/js/diagramly/sidebar/Sidebar.js

@@ -934,7 +934,7 @@
 		{
 			this.addStencilPalette('cisco' + cisco[i], 'Cisco / ' + cisco[i],
 				dir + '/cisco/' + cisco[i].toLowerCase().replace(/ /g, '_') + '.xml',
-				';html=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top', null, null, 1.6);
+				';html=1;dashed=0;fillColor=#036897;strokeColor=#ffffff;strokeWidth=2;verticalLabelPosition=bottom;verticalAlign=top;outlineConnect=0;', null, null, 1.6);
 		}
 
 		this.addFloorplanPalette();
@@ -1086,88 +1086,91 @@
 			this.editorUi.logEvent({category: 'Sidebar', action: 'search', label: searchTerms});
 		}
 		
-		success = mxUtils.bind(this, function(results, len, more, terms)
+		if (ICONSEARCH_PATH != null)
 		{
-			if (!this.editorUi.isOffline() && results.length <= count / 4)
+			success = mxUtils.bind(this, function(results, len, more, terms)
 			{
-				var pg = page - Math.ceil((len - count / 4) / count);
-
-				mxUtils.get(ICONSEARCH_PATH + '?v=2&q=' + encodeURIComponent(searchTerms) +
-					'&p=' + pg + '&c=' + count, mxUtils.bind(this, function(req)
+				if (!this.editorUi.isOffline() && results.length <= count / 4)
 				{
-					try
+					var pg = page - Math.ceil((len - count / 4) / count);
+	
+					mxUtils.get(ICONSEARCH_PATH + '?v=2&q=' + encodeURIComponent(searchTerms) +
+						'&p=' + pg + '&c=' + count, mxUtils.bind(this, function(req)
 					{
-						if (req.getStatus() >= 200 && req.getStatus() <= 299)
+						try
 						{
-							try
+							if (req.getStatus() >= 200 && req.getStatus() <= 299)
 							{
-								var res = JSON.parse(req.getText());
-								
-								if (res == null || res.icons == null)
-								{
-									succ(results, len, false, terms);
-									this.editorUi.handleError(res);
-								}
-								else
+								try
 								{
-									for (var i = 0; i < res.icons.length; i++)
+									var res = JSON.parse(req.getText());
+									
+									if (res == null || res.icons == null)
 									{
-										var sizes = res.icons[i].raster_sizes;
-										var index = sizes.length - 1;
-										
-										while (index > 0 && sizes[index].size > 128)
-										{
-											index--;
-										}
-				
-										var size = sizes[index].size;
-										var url = sizes[index].formats[0].preview_url;
-				
-										if (size != null && url != null)
+										succ(results, len, false, terms);
+										this.editorUi.handleError(res);
+									}
+									else
+									{
+										for (var i = 0; i < res.icons.length; i++)
 										{
-											(mxUtils.bind(this, function(s, u)
+											var sizes = res.icons[i].raster_sizes;
+											var index = sizes.length - 1;
+											
+											while (index > 0 && sizes[index].size > 128)
+											{
+												index--;
+											}
+					
+											var size = sizes[index].size;
+											var url = sizes[index].formats[0].preview_url;
+					
+											if (size != null && url != null)
 											{
-												results.push(mxUtils.bind(this, function()
+												(mxUtils.bind(this, function(s, u)
 												{
-													return this.createVertexTemplate('shape=image;html=1;verticalAlign=top;' +
-														'verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;' +
-														'aspect=fixed;image=' + u, s, s, '');
-												}));
-											}))(size, url);
+													results.push(mxUtils.bind(this, function()
+													{
+														return this.createVertexTemplate('shape=image;html=1;verticalAlign=top;' +
+															'verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;imageAspect=0;' +
+															'aspect=fixed;image=' + u, s, s, '');
+													}));
+												}))(size, url);
+											}
 										}
+					
+										succ(results, (page - 1) * count + results.length, res.icons.length == count, terms);
 									}
-				
-									succ(results, (page - 1) * count + results.length, res.icons.length == count, terms);
+								}
+								catch (e)
+								{
+									succ(results, len, false, terms);
+									this.editorUi.handleError(e);
 								}
 							}
-							catch (e)
+							else
 							{
 								succ(results, len, false, terms);
-								this.editorUi.handleError(e);
+								this.editorUi.handleError({message: mxResources.get('unknownError')});
 							}
 						}
-						else
+						catch (e)
 						{
 							succ(results, len, false, terms);
-							this.editorUi.handleError({message: mxResources.get('unknownError')});
+							this.editorUi.handleError(e);
 						}
-					}
-					catch (e)
+					},
+					function()
 					{
 						succ(results, len, false, terms);
-						this.editorUi.handleError(e);
-					}
-				},
-				function()
+					}));
+				}
+				else
 				{
-					succ(results, len, false, terms);
-				}));
-			}
-			else
-			{
-				succ(results, len, more || !this.editorUi.isOffline(), terms);
-			}
-		});
+					succ(results, len, more || !this.editorUi.isOffline(), terms);
+				}
+			});
+		}
 		
 		sidebarSearchEntries.apply(this, arguments);
 	};

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


+ 11 - 0
src/main/webapp/js/mxgraph/EditorUi.js

@@ -125,6 +125,17 @@ EditorUi = function(editor, container, lightbox)
 	// Contains the main graph instance inside the given panel
 	graph.init(this.diagramContainer);
 
+    // Improves line wrapping for in-place editor
+    if (mxClient.IS_SVG && graph.view.getDrawPane() != null)
+    {
+        var root = graph.view.getDrawPane().ownerSVGElement;
+        
+        if (root != null)
+        {
+            root.style.position = 'absolute';
+        }
+    }
+    
 	// Creates hover icons
 	this.hoverIcons = this.createHoverIcons();
 	

+ 6 - 0
src/main/webapp/js/mxgraph/Graph.js

@@ -2685,6 +2685,12 @@ HoverIcons.prototype.init = function()
 		}
 	}));
 	
+	// Resets current state when in-place editor starts
+	this.graph.addListener(mxEvent.START_EDITING, mxUtils.bind(this, function(evt)
+	{
+		this.reset();
+	}));
+	
 	// Resets current state after update of selection state for touch events
 	var graphClick = this.graph.click;
 	this.graph.click = mxUtils.bind(this, function(me)

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

@@ -3787,13 +3787,12 @@
 	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
 	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
 	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), true),
-	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.25), true),
 	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.25), true),
 	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
-	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.75), true),
 	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
 	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
 	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];

File diff suppressed because it is too large
+ 22 - 8
src/main/webapp/js/mxgraph/Sidebar.js


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


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