Bläddra i källkod

16.2.7 release

David Benson 4 år sedan
förälder
incheckning
8dedbe2f11

+ 45 - 0
.github/ISSUE_TEMPLATE/bug_report.md

@@ -0,0 +1,45 @@
+---
+name: Bug report
+about: Create a report to help us improve
+
+---
+
+### Preflight Checklist
+<!-- Please ensure you've completed the following steps by replacing [ ] with [x]-->
+
+* [ ] I agree to follow the [Code of Conduct](https://github.com/jgraph/drawio/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
+* [ ] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**draw.io version (In the Help->About menu of the draw.io editor):**
+
+- draw.io version [e.g. 12.6.7]
+
+**Desktop (please complete the following information):**
+ - OS: [e.g. iOS]
+ - Browser [e.g. chrome, safari]
+ - Version [e.g. 22]
+
+**Smartphone (please complete the following information):**
+ - Device: [e.g. iPhone6]
+ - OS: [e.g. iOS8.1]
+ - Browser [e.g. stock browser, safari]
+ - Version [e.g. 22]
+
+**Additional context**
+Add any other context about the problem here.

+ 0 - 61
.github/ISSUE_TEMPLATE/bug_report.yaml

@@ -1,61 +0,0 @@
-name: Bug Report
-description: Report a bug on the draw.io editor, or app.diagrams.net site
-title: "[Bug]: "
-labels: "bug :beetle:"
-body:
-- type: checkboxes
-  attributes:
-    label: Preflight Checklist
-    description: Please ensure you've completed all of the following.
-    options:
-      - label: I agree to follow the [Code of Conduct](https://github.com/jgraph/drawio/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
-        required: true
-      - label: I have searched the [issue tracker](https://github.com/jgraph/drawio/issues) for a bug report that matches the one I want to file, without success.
-        required: true
-- type: input
-  attributes:
-    label: draw.io Version
-    description: What version of draw.io are you using? The version is found under the help menu
-    placeholder: 1.2.3
-  validations:
-    required: true
-- type: dropdown
-  attributes:
-    label: What operating system are you using?
-    options:
-      - Windows
-      - macOS
-      - Ubuntu
-      - Other Linux
-      - Other (specify below)
-  validations:
-    required: true
-- type: input
-  attributes:
-    label: Operating System Version
-    description: What operating system version are you using? On Windows, click Start button > Settings > System > About. On macOS, click the Apple Menu > About This Mac. On Linux, use lsb_release or uname -a.
-    placeholder: "e.g. Windows 10 version 1909, macOS Catalina 10.15.7, iOS 13 or Ubuntu 20.04"
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Expected Behavior
-    description: A clear and concise description of what you expected to happen.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Actual Behavior
-    description: A clear description of what actually happens.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Reproduction steps
-    description: Exact steps for us to follow in order that we can see the problem. Remember, we cannot see your computer, don't assume we can guess anything you are doing.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Additional Information
-    description: If your problem needs further explanation please add more information here. You can drag and drop videos and screenshots below in this editing area to attach them.

+ 20 - 0
.github/ISSUE_TEMPLATE/feature_request.md

@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+
+---
+
+* [ ] I agree to follow the [Code of Conduct](https://github.com/jgraph/drawio/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
+* [ ] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
+
+**Is your feature request related to a problem? Please describe.**
+A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.

+ 0 - 51
.github/ISSUE_TEMPLATE/feature_request.yaml

@@ -1,51 +0,0 @@
-name: Feature Request
-description: Request a new feature on the draw.io editor, or app.diagrams.net site
-title: "[Feature Request]: "
-labels: "enhancement :sparkles:"
-body:
-- type: checkboxes
-  attributes:
-    label: Preflight Checklist
-    description: Please ensure you've completed all of the following.
-    options:
-      - label: I agree to follow the [Code of Conduct](https://github.com/jgraph/drawio/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
-        required: true
-      - label: I have searched the [issue tracker](https://github.com/jgraph/drawio/issues) for a feature request that matches the one I want to file, without success.
-        required: true
-      - label: I have checked that I am running the latest version of the software, see the [change log](https://github.com/jgraph/drawio/blob/dev/ChangeLog) to determine the latest version.
-        required: true
-- type: dropdown
-  attributes:
-    label: What operating system are you using?
-    options:
-      - Windows
-      - macOS
-      - Ubuntu
-      - Other Linux
-      - Other (specify below)
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Describe the solution you'd like
-    description: A clear and concise description of what you want to happen.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: What problem would this feature solve?
-    description: Explain why you and other users need this feature.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Describe alternatives you've considered
-    description: A clear and concise description of any alternative solutions or features you've considered.
-  validations:
-    required: true
-- type: textarea
-  attributes:
-    label: Additional information
-    description: Any additional information, screenshots, etc
-  validations:
-    required: false

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+14-JAN-2022: 16.2.7
+
+- Adds enumerateValue property
+- Adds peristent scratchpad and search in sketch
+- Updated for modified inline CSS
+- Fixes realtime zoom on iPad with sketch https://github.com/jgraph/drawio/issues/2545
+
 12-JAN-2022: 16.2.6
 
 - Fixes NPE

+ 1 - 1
VERSION

@@ -1 +1 @@
-16.2.6
+16.2.7

+ 53 - 52
src/main/webapp/electron.js

@@ -1,4 +1,5 @@
 const fs = require('fs')
+const fsProm = require('fs/promises');
 const os = require('os');
 const path = require('path')
 const url = require('url')
@@ -1494,7 +1495,7 @@ function getDraftFileName(fileObject)
 	return draftFileName;
 };
 
-function getFileDrafts(fileObject)
+async function getFileDrafts(fileObject)
 {
 	let filePath = fileObject.path;
 	let draftsPaths = [], drafts = [], draftFileName, counter = 1, uniquePart = '';
@@ -1511,8 +1512,8 @@ function getFileDrafts(fileObject)
 	{
 		try
 		{
-			let stat = fs.lstatSync(draftsPaths[i]);
-			drafts.push({data: fs.readFileSync(draftsPaths[i], 'utf8'), 
+			let stat = await fsProm.lstat(draftsPaths[i]);
+			drafts.push({data: await fsProm.readFile(draftsPaths[i], 'utf8'), 
 						created: stat.ctimeMs,
 						modified: stat.mtimeMs,
 						path: draftsPaths[i]});
@@ -1523,7 +1524,7 @@ function getFileDrafts(fileObject)
 	return drafts;
 };
 
-function saveDraft(fileObject, data)
+async function saveDraft(fileObject, data)
 {
 	if (data == null || data.length == 0)
 	{
@@ -1532,18 +1533,18 @@ function saveDraft(fileObject, data)
 	else
 	{
 		var draftFileName = fileObject.draftFileName || getDraftFileName(fileObject);
-		fs.writeFileSync(draftFileName, data, 'utf8');
+		await fsProm.writeFile(draftFileName, data, 'utf8');
 		return draftFileName;
 	}
 }
 
-function saveFile(fileObject, data, origStat, overwrite, defEnc)
+async function saveFile(fileObject, data, origStat, overwrite, defEnc)
 {
 	var retryCount = 0;
 	var backupCreated = false;
 	var bkpPath = path.join(path.dirname(fileObject.path), BKP_PREFEX + path.basename(fileObject.path) + BKP_EXT);
 
-	var writeFile = function()
+	var writeFile = async function()
 	{
 		if (data == null || data.length == 0)
 		{
@@ -1553,11 +1554,11 @@ function saveFile(fileObject, data, origStat, overwrite, defEnc)
 		{
 			var writeEnc = defEnc || fileObject.encoding;
 			
-			fs.writeFileSync(fileObject.path, data, writeEnc);
-			let stat2 = fs.statSync(fileObject.path);
+			await fsProm.writeFile(fileObject.path, data, writeEnc);
+			let stat2 = await fsProm.stat(fileObject.path);
 			// Workaround for possible writing errors is to check the written
 			// contents of the file and retry 3 times before showing an error
-			let writtenData = fs.readFileSync(fileObject.path, writeEnc);
+			let writtenData = await fsProm.readFile(fileObject.path, writeEnc);
 			
 			if (data != writtenData)
 			{
@@ -1565,7 +1566,7 @@ function saveFile(fileObject, data, origStat, overwrite, defEnc)
 				
 				if (retryCount < 3)
 				{
-					return writeFile();
+					return await writeFile();
 				}
 				else
 				{
@@ -1584,27 +1585,27 @@ function saveFile(fileObject, data, origStat, overwrite, defEnc)
 		}
 	};
 	
-	function doSaveFile()
+	async function doSaveFile()
 	{
 		//Copy file to backup file (after conflict and stat is checked)
 		try
 		{
-			fs.copyFileSync(fileObject.path, bkpPath, COPYFILE_EXCL);
+			await fsProm.copyFile(fileObject.path, bkpPath, COPYFILE_EXCL);
 			backupCreated = true;
 		}
 		catch (e) {} //Ignore
 					
-		return writeFile();
+		return await writeFile();
 	};
 	
 	if (overwrite)
 	{
-		return doSaveFile();
+		return await doSaveFile();
 	}
 	else
 	{
 		let stat = fs.existsSync(fileObject.path)?
-				 fs.statSync(fileObject.path) : null;
+					await fsProm.stat(fileObject.path) : null;
 
 		if (stat && isConflict(origStat, stat))
 		{
@@ -1612,14 +1613,14 @@ function saveFile(fileObject, data, origStat, overwrite, defEnc)
 		}
 		else
 		{
-			return doSaveFile();
+			return await doSaveFile();
 		}
 	}
 };
 
-function writeFile(path, data, enc)
+async function writeFile(path, data, enc)
 {
-	return fs.writeFileSync(path, data, enc);
+	return await fsProm.writeFile(path, data, enc);
 };
 
 function getAppDataFolder()
@@ -1658,7 +1659,7 @@ function checkFileExists(pathParts)
 	return fs.existsSync(path.join(...pathParts));
 };
 
-function showOpenDialog(defaultPath, filters, properties)
+async function showOpenDialog(defaultPath, filters, properties)
 {
 	return dialog.showOpenDialogSync({
 		defaultPath: defaultPath,
@@ -1667,7 +1668,7 @@ function showOpenDialog(defaultPath, filters, properties)
 	});
 };
 
-function showSaveDialog(defaultPath, filters)
+async function showSaveDialog(defaultPath, filters)
 {
 	return dialog.showSaveDialogSync({
 		defaultPath: defaultPath,
@@ -1675,7 +1676,7 @@ function showSaveDialog(defaultPath, filters)
 	});
 };
 
-function installPlugin(filePath)
+async function installPlugin(filePath)
 {
 	var pluginsDir = path.join(getAppDataFolder(), '/plugins');
 	
@@ -1693,7 +1694,7 @@ function installPlugin(filePath)
 	}
 	else
 	{
-		fs.copyFileSync(filePath, dstFile);
+		await fsProm.copyFile(filePath, dstFile);
 	}
 
 	return {pluginName: pluginName, selDir: path.dirname(filePath)};
@@ -1714,21 +1715,21 @@ function dirname(path_p)
 	return path.dirname(path_p);
 }
 
-function readFile(filename, encoding)
+async function readFile(filename, encoding)
 {
-	return fs.readFileSync(filename, encoding);
+	return await fsProm.readFile(filename, encoding);
 }
 
-function fileStat(file)
+async function fileStat(file)
 {
-	return fs.statSync(file);
+	return await fsProm.stat(file);
 }
 
-function isFileWritable(file)
+async function isFileWritable(file)
 {
 	try 
 	{
-		fs.accessSync(file, fs.constants.W_OK);
+		await fsProm.access(file, fs.constants.W_OK);
 		return true;
 	}
 	catch (e)
@@ -1755,9 +1756,9 @@ function clipboardAction(method, data)
 	}
 }
 
-function deleteFile(file) 
+async function deleteFile(file) 
 {
-	fs.unlinkSync(file);
+	await fsProm.unlink(file);
 }
 
 function windowAction(method)
@@ -1832,67 +1833,67 @@ ipcMain.on("rendererReq", async (event, args) =>
 		switch(args.action)
 		{
 		case 'saveFile':
-			ret = saveFile(args.fileObject, args.data, args.origStat, args.overwrite, args.defEnc);
+			ret = await saveFile(args.fileObject, args.data, args.origStat, args.overwrite, args.defEnc);
 			break;
 		case 'writeFile':
-			ret = writeFile(args.path, args.data, args.enc);
+			ret = await writeFile(args.path, args.data, args.enc);
 			break;
 		case 'saveDraft':
-			ret = saveDraft(args.fileObject, args.data);
+			ret = await saveDraft(args.fileObject, args.data);
 			break;
 		case 'getFileDrafts':
-			ret = getFileDrafts(args.fileObject);
+			ret = await getFileDrafts(args.fileObject);
 			break;
 		case 'getAppDataFolder':
-			ret = getAppDataFolder();
+			ret = await getAppDataFolder();
 			break;
 		case 'getDocumentsFolder':
-			ret = getDocumentsFolder();
+			ret = await getDocumentsFolder();
 			break;
 		case 'checkFileExists':
-			ret = checkFileExists(args.pathParts);
+			ret = await checkFileExists(args.pathParts);
 			break;
 		case 'showOpenDialog':
-			ret = showOpenDialog(args.defaultPath, args.filters, args.properties);
+			ret = await showOpenDialog(args.defaultPath, args.filters, args.properties);
 			break;
 		case 'showSaveDialog':
-			ret = showSaveDialog(args.defaultPath, args.filters);
+			ret = await showSaveDialog(args.defaultPath, args.filters);
 			break;
 		case 'installPlugin':
-			ret = installPlugin(args.filePath);
+			ret = await installPlugin(args.filePath);
 			break;
 		case 'uninstallPlugin':
-			ret = uninstallPlugin(args.plugin);
+			ret = await uninstallPlugin(args.plugin);
 			break;
 		case 'dirname':
-			ret = dirname(args.path);
+			ret = await dirname(args.path);
 			break;
 		case 'readFile':
-			ret = readFile(args.filename, args.encoding);
+			ret = await readFile(args.filename, args.encoding);
 			break;
 		case 'clipboardAction':
-			ret = clipboardAction(args.method, args.data);
+			ret = await clipboardAction(args.method, args.data);
 			break;
 		case 'deleteFile':
-			ret = deleteFile(args.file);
+			ret = await deleteFile(args.file);
 			break;
 		case 'fileStat':
-			ret = fileStat(args.file);
+			ret = await fileStat(args.file);
 			break;
 		case 'isFileWritable':
-			ret = isFileWritable(args.file);
+			ret = await isFileWritable(args.file);
 			break;
 		case 'windowAction':
-			ret = windowAction(args.method);
+			ret = await windowAction(args.method);
 			break;
 		case 'openExternal':
-			ret = openExternal(args.url);
+			ret = await openExternal(args.url);
 			break;
 		case 'watchFile':
-			ret = watchFile(args.path);
+			ret = await watchFile(args.path);
 			break;
 		case 'unwatchFile':	
-			ret = unwatchFile(args.path);
+			ret = await unwatchFile(args.path);
 			break;
 		};
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 198 - 197
src/main/webapp/js/app.min.js


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

@@ -34,8 +34,8 @@ if (!mxIsElectron && location.protocol !== 'http:')
 			'; ';
 
 		var styleHashes = '\'sha256-JjkxVHHCCVO0nllPD6hU8bBYSlsikA8TM/o3fhr0bas=\' ' + // index.html
-			'\'sha256-AmGry6TX9+7jq8dDe3fV57YLyCZkhoLUqLMFLkDHngQ=\' ' + // Minimal.js/Light
-			'\'sha256-9mIrMmC05PfyiKHe8Cf98PvG7wJ8gXtJv+bX221nLpk=\' ' + // Minimal.js/Dark
+			'\'sha256-1F7QEyp3oiW4n2eXlhilLpu+H5Wdj4t90pKtEyK/mFE=\' ' + // Minimal.js/Light
+			'\'sha256-V8wOMdVocmGIO0DHZHJsKN6viAFJOJRbsJ7UhdJlmng=\' ' + // Minimal.js/Dark
 			'\'sha256-7kY8ozVqKLIIBwZ24dhdmZkM26PsOlZmEi72RhmZKoM=\' ' + // mxTooltipHandler.js
 			'\'sha256-01chdey79TzZe4ihnvvUXXI5y8MklIcKH+vzDdQvsuU=\' ' + // Editor.js/mathJaxWebkitCss
 			'\'sha256-fGbXK7EYpvNRPca81zPnqJHi2y+34KSgAcZv8mhaSzI=\' ' + // MathJax.js

+ 21 - 0
src/main/webapp/js/diagramly/Dialogs.js

@@ -8210,6 +8210,27 @@ var MoreShapesDialog = function(editorUi, expanded, entries)
 					libs.push(lib);
 				}
 			}
+
+			// Redirects scratchpad and search entries
+			if (urlParams['sketch'] == '1' && editorUi.isSettingsEnabled())
+			{
+				var idx = mxUtils.indexOf(libs, '.scratchpad');
+
+				if ((editorUi.scratchpad != null) != (idx >= 0 && libs.splice(idx, 1).length > 0))
+				{
+					editorUi.toggleScratchpad();
+				}
+
+				// Handles search after scratchpad
+				idx = mxUtils.indexOf(libs, 'search');
+				mxSettings.settings.search = (idx >= 0 && libs.splice(idx, 1).length > 0);
+				editorUi.sidebar.showPalette('search', mxSettings.settings.search);
+
+				if (cb.checked)
+				{
+					mxSettings.save();
+				}
+			}
 			
 			editorUi.sidebar.showEntries(libs.join(';'), cb.checked, true);
 			editorUi.setSidebarTitles(labels.checked, cb.checked);

+ 22 - 15
src/main/webapp/js/diagramly/Editor.js

@@ -303,10 +303,6 @@
 	 * Common properties for all edges.
 	 */
 	Editor.commonProperties = [
-		{name: 'enumerate', dispName: 'Enumerate', type: 'bool', defVal: false, onChange: function(graph)
-		{
-			graph.refresh();
-		}},
         {name: 'comic', dispName: 'Comic', type: 'bool', defVal: false, isVisible: function(state, format)
         {
         	return mxUtils.getValue(state.style, 'sketch', '0') != '1';
@@ -530,6 +526,14 @@
         	return (state.vertices.length > 0) ? model.isVertex(model.getParent(state.vertices[0])) : false;
         }},
         {name: 'editable', dispName: 'Editable', type: 'bool', defVal: true},
+		{name: 'enumerate', dispName: 'Enumerate', type: 'bool', defVal: false, onChange: function(graph)
+		{
+			graph.refresh();
+		}},
+		{name: 'enumerateValue', dispName: 'Enumerate Value', type: 'string', defVal: '', isVisible: function(state, format)
+		{
+			return mxUtils.getValue(state.style, 'enumerate', '0') == '1';
+		}},
         {name: 'metaEdit', dispName: 'Edit Dialog', type: 'bool', defVal: false},
         {name: 'backgroundOutline', dispName: 'Background Outline', type: 'bool', defVal: false},
         {name: 'movable', dispName: 'Movable', type: 'bool', defVal: true},
@@ -6575,10 +6579,10 @@
 		recurse = (recurse != null) ? recurse : true;
 		var enumerate = (state != null && this.graph.model.isVertex(state.cell)) ?
 			mxUtils.getValue(state.style, 'enumerate', 0) == '1' : false;
-		
-		if (recurse && this.redrawNumberShape(state, enumerate))
+
+		if (recurse)
 		{
-			this.numberCounter++;
+			this.redrawNumberShape(state, enumerate);
 		}
 		
 		return state;
@@ -6589,14 +6593,10 @@
 	 */
 	mxGraphView.prototype.redrawNumberShape = function(state, enumerate)
 	{
-		var value = '<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">' +
-			(this.numberCounter + 1) + '</div>';
-		var result = false;
-		
 		if (enumerate && this.graph.model.isVertex(state.cell) &&
 			state.shape != null && state.secondLabel == null)
 		{	
-			state.secondLabel = new mxText(value, new mxRectangle(),
+			state.secondLabel = new mxText('', new mxRectangle(),
 				mxConstants.ALIGN_LEFT, mxConstants.ALIGN_BOTTOM);
 
 			// Styles the label
@@ -6614,6 +6614,16 @@
 			}
 			else
 			{
+				var enumValue =  mxUtils.getValue(state.style, 'enumerateValue', '');
+
+				if (enumValue == '')
+				{
+					enumValue = ++this.numberCounter;
+				}
+
+				var value = '<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">' +
+					mxUtils.htmlEntities(enumValue) + '</div>';
+				
 				var scale = this.graph.getView().getScale();
 				var bounds = new mxRectangle(state.x + state.width - 4 * scale, state.y + 4 * scale, 0, 0);
 				state.secondLabel.value = value;
@@ -6621,11 +6631,8 @@
 				state.secondLabel.scale = scale;
 				state.secondLabel.bounds = bounds;
 				state.secondLabel.redraw();
-				result = true;
 			}
 		}
-
-		return result;
 	};
 
 	/**

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

@@ -1487,7 +1487,7 @@ mxStencilRegistry.allowEval = false;
 			this.fileObject.path = path;
 			this.fileObject.name = path.replace(/^.*[\\\/]/, '');
 			this.fileObject.type = 'utf-8';
-			
+			this.setEditable(true); //In case original file is read only
 			this.save(false, success, error, null, true);
 		}
 	};

+ 13 - 3
src/main/webapp/js/diagramly/Minimal.js

@@ -411,7 +411,7 @@ EditorUi.initMinimalTheme = function()
 
 			// Sets instance vars and graph stylesheet
 			this.spinner.opts.color = Editor.isDarkMode() ? '#c0c0c0' : '#000';
-			this.setGridColor(Editor.isDarkMode() ? graph.view.defaultDarkGridColor : graph.view.defaultGridColor);
+			graph.view.gridColor = Editor.isDarkMode() ? graph.view.defaultDarkGridColor : graph.view.defaultGridColor;
 			graph.defaultPageBackgroundColor = (urlParams['embedInline'] == '1') ? 'transparent' :
 				Editor.isDarkMode() ? Editor.darkColor : '#ffffff';
 			graph.defaultPageBorderColor = Editor.isDarkMode() ? '#505759' : '#ffffff';
@@ -1681,9 +1681,19 @@ EditorUi.initMinimalTheme = function()
 		div.style.bottom = (urlParams['embed'] != '1' || urlParams['libraries'] == '1') ? '63px' : '32px';
 		this.sidebar = this.createSidebar(div);
 		
-		if (urlParams['sketch'] == '1')
+		if (urlParams['sketch'] == '1' && this.sidebar != null && this.isSettingsEnabled())
 		{
-			this.toggleScratchpad();
+			/**
+			 * Shows scratchpad if never shown.
+			 */
+			if ((!this.editor.chromeless || this.editor.editable) && (mxSettings.settings.isNew ||
+				parseInt(mxSettings.settings.version || 0) <= 8))
+			{
+				this.toggleScratchpad();
+				mxSettings.save();
+			}
+
+			this.sidebar.showPalette('search', mxSettings.settings.search);
 		}
 
 		if ((urlParams['sketch'] != '1' && iw >= 1000) || urlParams['clibs'] != null ||

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

@@ -445,13 +445,6 @@
 		
 		// Merges array of semicolon separated strings into a single array
 		var temp = all.join(';').split(';');
-		
-		if (urlParams['sketch'] == '1' &&
-			(mxUtils.indexOf(temp, '.scratchpad') < 0) !=
-			(this.editorUi.scratchpad == null))
-		{
-			this.editorUi.toggleScratchpad();
-		}
 
 		// Resolves aliases and creates lookup
 		var visible = {};
@@ -464,7 +457,7 @@
 		for (var i = 0; i < this.configuration.length; i++)
 		{
 			// Search has separate switch in Extras menu
-			if (urlParams['sketch'] == '1' || this.configuration[i].id != 'search')
+			if (this.configuration[i].id != 'search')
 			{
 				this.showPalettes(this.configuration[i].prefix || '',
 					this.configuration[i].libs || [this.configuration[i].id],

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 158 - 158
src/main/webapp/js/stencils.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 121 - 120
src/main/webapp/js/viewer-static.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 121 - 120
src/main/webapp/js/viewer.min.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 8 - 8
src/main/webapp/mxgraph/mxClient.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
src/main/webapp/service-worker.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 1
src/main/webapp/service-worker.js.map


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2 - 0
src/main/webapp/workbox-12cca165.js


Filskillnaden har hållts tillbaka eftersom den är för stor
+ 1 - 0
src/main/webapp/workbox-12cca165.js.map