David Benson 3 éve
szülő
commit
ffed4fb519

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+22-NOV-2021: 15.8.4
+
+- Fixes move of edge labels after ungroup https://github.com/jgraph/drawio/issues/2433
+- [conf cloud] Added space filtering to page collection to avoid CONFCLOUD-73202
+- Fixes default color and other possible rgba colors in vsdx export
+- [conf cloud] Added revision history to Board macro
+
 19-NOV-2021: 15.8.3
 
 - Removes whitespace in resource values

+ 1 - 1
VERSION

@@ -1 +1 @@
-15.8.3
+15.8.4

+ 8 - 6
src/main/webapp/electron.js

@@ -32,6 +32,7 @@ let windowsRegistry = []
 let cmdQPressed = false
 let firstWinLoaded = false
 let firstWinFilePath = null
+let isMac = process.platform === 'darwin'
 
 //Read config file
 var queryObj = {
@@ -47,7 +48,8 @@ var queryObj = {
 	'picker': 0,
 	'mode': 'device',
 	'export': 'https://convert.diagrams.net/node/export',
-	'disableUpdate': disableUpdate? 1 : 0
+	'disableUpdate': disableUpdate? 1 : 0,
+	'winCtrls': isMac? 0 : 1
 };
 
 try
@@ -71,7 +73,7 @@ function createWindow (opt = {})
 {
 	let options = Object.assign(
 	{
-		frame: false,
+		frame: isMac,
 		backgroundColor: '#FFF',
 		width: 1600,
 		height: 1200,
@@ -81,7 +83,7 @@ function createWindow (opt = {})
 			// preload: path.resolve('./preload.js'),
 			nodeIntegration: true,
 			nodeIntegrationInWorker: true,
-			spellcheck: (os.platform() == "darwin" ? true : false),
+			spellcheck: isMac,
 			contextIsolation: false,
 			nativeWindowOpen: true
 		}
@@ -684,7 +686,7 @@ app.on('ready', e =>
 
 	ipcMain.on('checkForUpdates', checkForUpdatesFn);
 
-	if (process.platform === 'darwin')
+	if (isMac)
 	{
 	    let template = [{
 	      label: app.name,
@@ -745,7 +747,7 @@ app.on('ready', e =>
 })
 
 //Quit from the dock context menu should quit the application directly
-if (process.platform === 'darwin') 
+if (isMac) 
 {
 	app.on('before-quit', function() {
 		cmdQPressed = true;
@@ -762,7 +764,7 @@ app.on('window-all-closed', function ()
 	
 	// On OS X it is common for applications and their menu bar
 	// to stay active until the user quits explicitly with Cmd + Q
-	if (cmdQPressed || process.platform !== 'darwin')
+	if (cmdQPressed || !isMac)
 	{
 		app.quit()
 	}

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 406 - 405
src/main/webapp/js/app.min.js


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

@@ -1424,11 +1424,6 @@ App.prototype.init = function()
 		{
 			this.updateUserElement();
 			this.restoreLibraries();
-
-			this.showBanner('GithubFooter', 'Click to install GitHub app', mxUtils.bind(this, function()
-			{
-				this.openLink('https://github.com/apps/draw-io-app');
-			}));
 		}));
 	}
 	

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

@@ -1690,6 +1690,11 @@ mxStencilRegistry.allowEval = false;
 	{
 		origUpdateHeader.apply(this, arguments);
 		
+		if (urlParams['winCtrls'] != '1')
+		{
+			return;	
+		}
+		
 		document.querySelectorAll('.geMenuItem').forEach(i => i.style.webkitAppRegion = 'no-drag');
 		var menubarContainer = document.querySelector('.geMenubarContainer');
 		
@@ -1762,7 +1767,7 @@ mxStencilRegistry.allowEval = false;
 			this.appIcon.style.webkitAppRegion = 'no-drag';
 		}
 		
-		if (this.menubar != null)
+		if (this.menubar != null && uiTheme !== 'atlas')
 		{
 			this.menubar.container.style.webkitAppRegion = 'no-drag';
 		}

+ 2 - 7
src/main/webapp/js/diagramly/GitHubClient.js

@@ -21,12 +21,7 @@ mxUtils.extend(GitHubClient, DrawioClient);
  * LATER: If thumbnails are disabled, make sure to replace the
  * existing thumbnail with the placeholder only once.
  */
-GitHubClient.prototype.clientId = (window.location.hostname == 'test.draw.io') ? '23bc97120b9035515661' : window.DRAWIO_GITHUB_ID;
-
-/**
- * OAuth scope.
- */
-GitHubClient.prototype.scope = 'repo';
+GitHubClient.prototype.clientId = (window.location.hostname == 'test.draw.io') ? 'Iv1.1218f5567fbc258a' : window.DRAWIO_GITHUB_ID;
 
 /**
  * Default extension for new files.
@@ -153,7 +148,7 @@ GitHubClient.prototype.authenticateStep2 = function(state, success, error)
 			this.ui.showAuthDialog(this, true, mxUtils.bind(this, function(remember, authSuccess)
 			{
 				var win = window.open(this.baseHostUrl + '/login/oauth/authorize?client_id=' +
-					this.clientId + '&scope=' + this.scope + 
+					this.clientId +  
 					'&state=' + encodeURIComponent('cId=' + this.clientId + //To identify which app/domain is used
 						'&domain=' + window.location.hostname + '&token=' + state), 'ghauth');
 				

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

@@ -29,7 +29,7 @@ window.DRAWIO_GITLAB_URL = window.DRAWIO_GITLAB_URL || 'https://gitlab.com';
 window.DRAWIO_GITLAB_ID = window.DRAWIO_GITLAB_ID || 'c9b9d3fcdce2dec7abe3ab21ad8123d89ac272abb7d0883f08923043e80f3e36';
 window.DRAWIO_GITHUB_URL = window.DRAWIO_GITHUB_URL || 'https://github.com';
 window.DRAWIO_GITHUB_API_URL = window.DRAWIO_GITHUB_API_URL || 'https://api.github.com';
-window.DRAWIO_GITHUB_ID = window.DRAWIO_GITHUB_ID || '4f88e2ec436d76c2ee6e';
+window.DRAWIO_GITHUB_ID = window.DRAWIO_GITHUB_ID || 'Iv1.98d62f0431e40543';
 window.DRAWIO_DROPBOX_ID = window.DRAWIO_DROPBOX_ID || 'libwls2fa9szdji';
 window.SAVE_URL = window.SAVE_URL || 'save';
 window.OPEN_URL = window.OPEN_URL || 'import';

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

@@ -1200,7 +1200,7 @@
 							elt.style.top = '0px';
 						}
 						
-						if (EditorUi.isElectronApp)
+						if (urlParams['winCtrls'] == '1')
 						{
 							elt.style.right = '95px';
 						}

+ 7 - 2
src/main/webapp/js/diagramly/Minimal.js

@@ -88,7 +88,7 @@ EditorUi.initMinimalTheme = function()
 			ui.formatWindow = new WrapperWindow(ui, mxResources.get('format'),
 				(urlParams['sketch'] == '1') ? Math.max(10, ui.diagramContainer.clientWidth - 241) :
 				Math.max(10, ui.diagramContainer.clientWidth - 248), 
-				EditorUi.isElectronApp && urlParams['sketch'] == '1'? 80 : 60,
+				urlParams['winCtrls'] == '1' && urlParams['sketch'] == '1'? 80 : 60,
 				240, Math.min(566, graph.container.clientHeight - 10), function(container)
 			{
 				var format = ui.createFormat(container);
@@ -1073,6 +1073,11 @@ EditorUi.initMinimalTheme = function()
 					urlParams['saveAndExit'] != '0'))
 				{
 					ui.menus.addMenuItems(menu, ['saveAndExit'], parent);
+					
+					if (file != null && file.isRevisionHistorySupported())
+					{
+						ui.menus.addMenuItems(menu, ['revisionHistory'], parent);
+					}
 				}
 				
 				menu.addSeparator(parent);
@@ -1800,7 +1805,7 @@ EditorUi.initMinimalTheme = function()
         ui.diagramContainer.style.top = (urlParams['sketch'] == '1') ? '0px' : '47px';
 
 		//Create draggable titlebar
-		if (EditorUi.isElectronApp && urlParams['sketch'] == '1')
+		if (urlParams['winCtrls'] == '1' && urlParams['sketch'] == '1')
 		{
 			wrapper.style.top = '20px';
 			ui.titlebar = document.createElement('div');

+ 4 - 4
src/main/webapp/js/diagramly/vsdx/VsdxExport.js

@@ -172,7 +172,7 @@ function VsdxExport(editorUi)
 
 	function applyMxCellStyle(state, shape, xmlDoc)
 	{
-		var fillClr = state.style[mxConstants.STYLE_FILLCOLOR];
+		var fillClr = mxUtils.rgba2hex(state.style[mxConstants.STYLE_FILLCOLOR]);
 		
 		if (!fillClr || fillClr == "none")
 		{
@@ -181,7 +181,7 @@ function VsdxExport(editorUi)
 		else
 		{
 			shape.appendChild(createCellElem("FillForegnd", fillClr, xmlDoc));
-			var gradClr = state.style[mxConstants.STYLE_GRADIENTCOLOR];
+			var gradClr = mxUtils.rgba2hex(state.style[mxConstants.STYLE_GRADIENTCOLOR]);
 
 			if (gradClr && gradClr != "none")
 			{
@@ -209,7 +209,7 @@ function VsdxExport(editorUi)
 			}
 		}
 
-		var strokeClr = state.style[mxConstants.STYLE_STROKECOLOR];
+		var strokeClr = mxUtils.rgba2hex(state.style[mxConstants.STYLE_STROKECOLOR]);
 		
 		if (!strokeClr || strokeClr == "none")
 			shape.appendChild(createCellElem("LinePattern", 0, xmlDoc));
@@ -330,7 +330,7 @@ function VsdxExport(editorUi)
 
 		//TODO for some reason, visio doesn't show the label (text) background color!
 		//May be we need mxSvgCanvas2D.prototype.addTextBackground = function(node, str, x, y, w, h, align, valign, overflow)
-		var lbkgnd = state.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];
+		var lbkgnd = mxUtils.rgba2hex(state.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]);
 		if (lbkgnd) shape.appendChild(createCellElem("TextBkgnd", lbkgnd, xmlDoc));
 	};
 

+ 2 - 10
src/main/webapp/js/diagramly/vsdx/mxVsdxCanvas2D.js

@@ -769,14 +769,6 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 
 		var text = this.createElt("Text");
 
-		var rgb2hex = function (rgb){
-			rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
-			return (rgb && rgb.length === 4) ? "#" +
-			  ("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
-			  ("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
-			  ("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';
-		};
-		
 		var rowIndex = 0, pIndex = 0;
 		var calcW = 0, calcH = 0, lastW = 0, lastH = 0, lineH = 0;
 		
@@ -816,7 +808,7 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 			charRow.setAttribute('IX', rowIndex);
 			
 			
-			if (styleMap['fontColor'])	charRow.appendChild(that.createCellElem("Color", styleMap['fontColor']));
+			if (styleMap['fontColor'])	charRow.appendChild(that.createCellElem("Color", mxUtils.rgba2hex(styleMap['fontColor'])));
 			
 			if (fontSize)	charRow.appendChild(that.createCellElemScaled("Size", fontSize * 0.97)); //the magic number 0.97 is needed such that text do not overflow
 			
@@ -912,7 +904,7 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 						italic: style.getPropertyValue('font-style') == 'italic' || pStyle['italic'],
 						underline: style.getPropertyValue('text-decoration').indexOf('underline') >= 0 || pStyle['underline'],
 						align: style.getPropertyValue('text-align'),
-						fontColor: rgb2hex(style.getPropertyValue('color')),
+						fontColor: style.getPropertyValue('color'),
 						fontSize: parseFloat(style.getPropertyValue('font-size')),
 						fontFamily: style.getPropertyValue('font-family').replace(/"/g, ''), //remove quotes
 						blockElem: style.getPropertyValue('display') == 'block' || nodeName == "BR" || nodeName == "LI",

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 574 - 574
src/main/webapp/js/extensions.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 171 - 171
src/main/webapp/js/stencils.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 117 - 116
src/main/webapp/js/viewer-static.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 117 - 116
src/main/webapp/js/viewer.min.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 40 - 39
src/main/webapp/mxgraph/mxClient.js


+ 5 - 0
src/main/webapp/plugins/cConf-1-4-8.js

@@ -1307,6 +1307,11 @@ Draw.loadPlugin(function(ui)
 	 * Delay for last save in ms.
 	 */
 	EmbedFile.prototype.saveDelay = 0;
+	
+	EmbedFile.prototype.isRevisionHistorySupported = function()
+	{
+		return true;
+	};
 
 	/**
 	 * 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/service-worker.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
src/main/webapp/service-worker.js.map