浏览代码

14.7.6 release

David Benson [draw.io] 4 年之前
父节点
当前提交
aaaac0fc4a

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+04-JUN-2021: 14.7.6
+
+- Adds delete button in sketch theme
+
 03-JUN-2021: 14.7.5
 
 - Removes padding in outline

+ 1 - 1
VERSION

@@ -1 +1 @@
-14.7.5
+14.7.6

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


+ 9 - 5
src/main/webapp/js/diagramly/Dialogs.js

@@ -2869,8 +2869,8 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 	mxEvent.addListener(div, 'mouseleave', function(evt)
 	{
 		if (evt.toElement != null && editorUi.sidebar.tooltip != null &&
-			editorUi.sidebar.tooltip != evt.toElement &&
-			!editorUi.sidebar.tooltip.contains(evt.toElement))
+			!mxUtils.isAncestorNode(editorUi.sidebar.tooltip, evt.toElement))
+
 		{
 			editorUi.sidebar.hideTooltip();
 			currentElt = null;
@@ -2967,7 +2967,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 		function showTooltip(xml, x, y)
 		{
 			// Checks if dialog still visible
-			if (document.body.contains(elt))
+			if (xml != null && mxUtils.isAncestorNode(document.body, elt))
 			{
 				var doc = mxUtils.parseXml(xml);
 				var tempNode = Editor.parseDiagramNode(doc.documentElement);
@@ -2985,6 +2985,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 					true, new mxPoint(x, y), true, function()
 					{
 						selectElement(elt, null, null, url, infoObj, clibs);
+						hideTooltip();
 					});
 			}
 		};
@@ -3050,14 +3051,14 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 
 		mxEvent.addGestureListeners(elt, mxUtils.bind(this, function(evt)
 		{
-			hideTooltip();
-			
 			if (editorUi.sidebar.currentElt != elt)
 			{
 				currentElt = null;
 				startTimer(evt, 600);
 				mxEvent.consume(evt);
 			}
+			
+			hideTooltip();
 		}), mxUtils.bind(this, function(evt)
 		{
 			startTimer(evt, 600);
@@ -3108,6 +3109,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 			mxEvent.addGestureListeners(elt, mxUtils.bind(this, function(evt)
 			{
 				selectElement(elt, null, null, url, infoObj, clibs);
+				hideTooltip();
 				mxEvent.consume(evt);
 			}), null, null);
 			
@@ -3159,6 +3161,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 			mxEvent.addGestureListeners(elt, mxUtils.bind(this, function(evt)
 			{
 				activate();
+				hideTooltip();
 				mxEvent.consume(evt);
 			}), null, null);
 			
@@ -3183,6 +3186,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
 			mxEvent.addGestureListeners(elt, mxUtils.bind(this, function(evt)
 			{
 				selectElement(elt, null, null, url, infoObj);
+				hideTooltip();
 				mxEvent.consume(evt);
 			}), null, null);
 			

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

@@ -6900,7 +6900,7 @@
 	/**
 	 * Imports the given Visio file
 	 */
-	EditorUi.prototype.importVisio = function(file, done, onerror, filename)
+	EditorUi.prototype.importVisio = function(file, done, onerror, filename, customParam)
 	{
 		//A reduced version of this code is used in conf/jira plugins, review that code whenever this function is changed
 		filename = (filename != null) ? filename : file.name; 
@@ -6958,6 +6958,11 @@
 						xhr.responseType = 'blob';
 						this.addRemoteServiceSecurityCheck(xhr);
 						
+						if (customParam != null)
+						{
+							xhr.setRequestHeader('x-convert-custom', customParam);
+						}
+						
 						xhr.onreadystatechange = mxUtils.bind(this, function()
 						{
 							if (xhr.readyState == 4)

+ 17 - 6
src/main/webapp/js/diagramly/Minimal.js

@@ -1968,11 +1968,19 @@ EditorUi.initMinimalTheme = function()
 	       		'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==');
 			var fitElt = addMenuItem('', fitFunction, true, mxResources.get('fit') + ' (' + Editor.ctrlKey + '+H)', resetViewAction, fullscreenImage);
 			var fullscreenElt = addMenuItem('', fullscreenAction.funct, null, mxResources.get('fullscreen'), fullscreenAction, fullscreenImage);
+			var deleteImage = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==';
 
 			if (footer != null)
 			{
-				toolbar.appendChild(undoElt);
-				toolbar.appendChild(redoElt);
+				var deleteAction = ui.actions.get('delete');
+				var deleteElt = addMenuItem('', deleteAction.funct, null, mxResources.get('delete'), deleteAction, deleteImage);
+				deleteElt.style.opacity = '0.1';
+	        	toolbar.appendChild(deleteElt);
+
+				deleteAction.addListener('stateChanged', function()
+				{
+					deleteElt.style.opacity = (deleteAction.enabled) ? '0.4' : '0.1';
+				});
 				
 				var undoListener = function()
 				{
@@ -1983,7 +1991,10 @@ EditorUi.initMinimalTheme = function()
 					undoElt.style.opacity = (undoAction.enabled) ? '0.4' : '0.1';
 					redoElt.style.opacity = (redoAction.enabled) ? '0.4' : '0.1';
 				};
-								
+				
+				toolbar.appendChild(undoElt);
+				toolbar.appendChild(redoElt);
+				
 				undoAction.addListener('stateChanged', undoListener);
 				redoAction.addListener('stateChanged', undoListener);
 				undoListener();
@@ -2194,9 +2205,9 @@ EditorUi.initMinimalTheme = function()
 	   				(small) ? 60 : null);
 			
 		        var elt = addMenu('insert', true, (small) ? insertImage : null);
-	        	createGroup([elt, addMenuItem(mxResources.get('delete'), ui.actions.get('delete').funct, null, mxResources.get('delete'), ui.actions.get('delete'),
-		        	(small) ? 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNNiAxOWMwIDEuMS45IDIgMiAyaDhjMS4xIDAgMi0uOSAyLTJWN0g2djEyek0xOSA0aC0zLjVsLTEtMWgtNWwtMSAxSDV2MmgxNFY0eiIvPjwvc3ZnPg==' : null)],
-	   				(small) ? 60 : null);
+	        	createGroup([elt, addMenuItem(mxResources.get('delete'), ui.actions.get('delete').funct,
+					null, mxResources.get('delete'), ui.actions.get('delete'),
+		        	(small) ? deleteImage : null)], (small) ? 60 : null);
 	
 		        if (iw >= 411)
 		        {

+ 9 - 9
src/main/webapp/js/grapheditor/Sidebar.js

@@ -277,14 +277,7 @@ Sidebar.prototype.createTooltip = function(elt, cells, w, h, title, showLabel, o
 		this.tooltip.className = 'geSidebarTooltip';
 		this.tooltip.style.zIndex = mxPopupMenu.prototype.zIndex - 1;
 		document.body.appendChild(this.tooltip);
-			
-		// Blocks links in previews
-		this.tooltip.addEventListener('mouseup', mxUtils.bind(this, function(evt)
-		{
-			this.hideTooltip();
-			mxEvent.consume(evt);
-		}), true);
-		
+
 		mxEvent.addMouseWheelListener(mxUtils.bind(this, function(evt)
 		{
 			this.hideTooltip();
@@ -299,12 +292,19 @@ Sidebar.prototype.createTooltip = function(elt, cells, w, h, title, showLabel, o
 		this.graph2.setConnectable(false);
 		this.graph2.setEnabled(false);
 		
-		mxEvent.addGestureListeners(this.tooltip, mxUtils.bind(this, function()
+		mxEvent.addGestureListeners(this.tooltip, mxUtils.bind(this, function(evt)
 		{
 			if (this.tooltipMouseDown != null)
 			{
 				this.tooltipMouseDown();
 			}
+			
+			this.hideTooltip();
+			mxEvent.consume(evt);
+		}), null, mxUtils.bind(this, function(evt)
+		{
+			this.hideTooltip();
+			mxEvent.consume(evt);
 		}));
 		
 		if (!mxClient.IS_SVG)

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


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


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/mxgraph/mxClient.js


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/service-worker.js


文件差异内容过多而无法显示
+ 1 - 1
src/main/webapp/service-worker.js.map


+ 3 - 3
src/main/webapp/vsdxImporter.html

@@ -6,7 +6,7 @@
 <script type="text/javascript" src="js/app.min.js"></script>
 <script type="text/javascript" src="js/extensions.min.js"></script>
 <script type="text/javascript">
-  function doImport(vsdxBuff, callback, error, file)
+  function doImport(vsdxBuff, callback, error, file, customParam)
   {
 	EditorUi.prototype.createUi = function(){};
 	EditorUi.prototype.addTrees = function(){};
@@ -14,7 +14,7 @@
  	var editorUi = new EditorUi();
  	var blob = file? file : new Blob([vsdxBuff], {type: 'application/octet-stream'});
 
- 	editorUi.importVisio(blob, callback, error, file? file.name : null);		
+ 	editorUi.importVisio(blob, callback, error, file? file.name : null, customParam);		
   };
 
   try
@@ -61,7 +61,7 @@
 				{
 					console.log(err)
 					createDoneDiv('error');
-				}, curFiles[0]);
+				}, curFiles[0], window.customParam);
 			}
 		});
 	</script>