소스 검색

15.6.5 release

David Benson [draw.io] 3 년 전
부모
커밋
7aef90f0f4

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+01-NOV-2021: 15.6.5
+
+- Fixes change of default style
+
 01-NOV-2021: 15.6.4
 
 - Moves resolve default colors to cell style https://github.com/jgraph/drawio/issues/2370

+ 1 - 1
VERSION

@@ -1 +1 @@
-15.6.4
+15.6.5

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 950 - 950
src/main/webapp/js/app.min.js


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

@@ -5861,7 +5861,7 @@ App.prototype.updateButtonContainer = function()
 			//Fetch notifications
 			if (urlParams['extAuth'] != '1') //Disable notification with external auth (e.g, Teams app)
 			{
-				this.fetchAndShowNotification(this.mode == 'device' || this.mode == 'google'? this.mode : null);
+				this.fetchAndShowNotification('online', this.mode);
 			}
 		}
 		else if (urlParams['notif'] != null) //Notif for embed mode
@@ -5872,7 +5872,7 @@ App.prototype.updateButtonContainer = function()
 };
 
 
-App.prototype.fetchAndShowNotification = function(target)
+App.prototype.fetchAndShowNotification = function(target, subtarget)
 {
 	if (this.fetchingNotif)
 	{
@@ -5887,7 +5887,8 @@ App.prototype.fetchAndShowNotification = function(target)
 	{
 		notifs = notifs.filter(function(notif)
 		{
-			return !notif.targets || notif.targets.indexOf(target) > -1;
+			return !notif.targets || notif.targets.indexOf(target) > -1 || 
+						(subtarget != null && notif.targets.indexOf(subtarget) > -1);
 		});
 		
 		var lsReadFlag = target + 'NotifReadTS';

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

@@ -1279,7 +1279,7 @@ var CreateGraphDialog = function(editorUi, title, type)
 		graph.connectionHandler.createEdgeState = function(me)
 		{
 			var edge = graph.createEdge(null, null, null, null, null, edgeStyle);
-			
+
 			return new mxCellState(this.graph.view, edge, this.graph.getCellStyle(edge));
 		};
 	

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

@@ -5273,7 +5273,7 @@
 									style = mxUtils.removeStylename(style, stylenames[j]);
 								}
 
-								var defaults = (graph.getModel().isVertex(cells[i])) ? ui.initialDefaultVertexStyle : ui.initialdefaultEdgeStyle;
+								var defaults = (graph.getModel().isVertex(cells[i])) ? graph.defaultVertexStyle : graph.defaultEdgeStyle;
 								
 								if (colorset != null)
 								{
@@ -5367,12 +5367,12 @@
 						}
 						else if (colorset['fill'] == '')
 						{
-							btn.style.backgroundColor = mxUtils.getValue(ui.initialDefaultVertexStyle,
+							btn.style.backgroundColor = mxUtils.getValue(graph.defaultVertexStyle,
 								mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
 						}
 						else
 						{
-							btn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(ui.initialDefaultVertexStyle,
+							btn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(graph.defaultVertexStyle,
 								mxConstants.STYLE_FILLCOLOR, (Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
 						}
 						
@@ -5382,12 +5382,12 @@
 						}
 						else if (colorset['stroke'] == '')
 						{
-							btn.style.border = b + ' ' + mxUtils.getValue(ui.initialDefaultVertexStyle, 
+							btn.style.border = b + ' ' + mxUtils.getValue(graph.defaultVertexStyle, 
 								mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff');
 						}
 						else
 						{
-							btn.style.border = b + ' ' + (colorset['stroke'] || mxUtils.getValue(ui.initialDefaultVertexStyle,
+							btn.style.border = b + ' ' + (colorset['stroke'] || mxUtils.getValue(graph.defaultVertexStyle,
 									mxConstants.STYLE_STROKECOLOR, (!Editor.isDarkMode()) ? Editor.darkColor : '#ffffff'));
 						}
 

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

@@ -2724,6 +2724,12 @@
 				
 				EditorUi.debug('File.opened', [file]);
 				
+				//Notify users that editing is disabled within mobile apps (mainly for MS Teams)
+				if (urlParams['viewerOnlyMsg'] == '1')
+				{
+					this.showAlert(mxResources.get('viewerOnlyMsg'));
+				}
+			
 				if (this.editor.editable && this.mode == file.getMode() &&
 					file.getMode() != App.MODE_DEVICE && file.getMode() != null)
 				{
@@ -10319,8 +10325,6 @@
 					concat(this.menus.defaultFonts);
 			}
 
-			this.initialDefaultVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
-			this.initialDefaultEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
 			graph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
 			graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
 			this.clearDefaultStyle();

+ 6 - 2
src/main/webapp/js/diagramly/Init.js

@@ -184,8 +184,12 @@ if (/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAg
 	urlParams['gapi'] = '0';
 	urlParams['noDevice'] = '1';
 	//Force viewer only
-	urlParams['lightbox'] = '1';
-	urlParams['layers'] = '1';
+	if (urlParams['lightbox'] != '1')
+	{
+		urlParams['lightbox'] = '1';
+		urlParams['layers'] = '1';
+		urlParams['viewerOnlyMsg'] = '1';
+	}
 }
 
 // Uses lightbox mode on viewer domain

+ 0 - 2
src/main/webapp/js/grapheditor/EditorUi.js

@@ -14,8 +14,6 @@ EditorUi = function(editor, container, lightbox)
 	
 	var graph = this.editor.graph;
 	graph.lightbox = lightbox;
-	this.initialDefaultVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
-	this.initialDefaultEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
 
 	// Overrides graph bounds to include background pages
 	var graphGetGraphBounds = graph.getGraphBounds;

+ 6 - 10
src/main/webapp/js/grapheditor/Format.js

@@ -6167,9 +6167,6 @@ DiagramStylePanel.prototype.addView = function(div)
 			}
 		}
 		
-		// FIXME: Reset for sketch mode
-		graph.defaultVertexStyle = mxUtils.clone(ui.initialDefaultVertexStyle);
-		graph.defaultEdgeStyle = mxUtils.clone(ui.initialDefaultEdgeStyle);
 		ui.clearDefaultStyle();
 	}));
 	
@@ -6282,14 +6279,13 @@ DiagramStylePanel.prototype.addView = function(div)
 			}), null, mxUtils.bind(this, function(evt)
 			{
 				panel.style.opacity = 1;
-				graph.defaultVertexStyle = mxUtils.clone(ui.initialDefaultVertexStyle);
-				graph.defaultEdgeStyle = mxUtils.clone(ui.initialDefaultEdgeStyle);
+				graph.currentVertexStyle = mxUtils.clone(graph.defaultVertexStyle);
+				graph.currentEdgeStyle = mxUtils.clone(graph.defaultEdgeStyle);
 				
-				applyStyle(commonStyle, graph.defaultVertexStyle);
-				applyStyle(commonStyle, graph.defaultEdgeStyle);
-				applyStyle(vertexStyle, graph.defaultVertexStyle);
-				applyStyle(edgeStyle, graph.defaultEdgeStyle);
-				ui.clearDefaultStyle();
+				applyStyle(commonStyle, graph.currentVertexStyle);
+				applyStyle(commonStyle, graph.currentEdgeStyle);
+				applyStyle(vertexStyle, graph.currentVertexStyle);
+				applyStyle(edgeStyle, graph.currentEdgeStyle);
 				
 				if (sketch)
 				{

+ 2 - 0
src/main/webapp/js/grapheditor/Graph.js

@@ -7280,6 +7280,8 @@ if (typeof mxVertexHandler != 'undefined')
 			{
 				state.style[key] = this.graph.currentEdgeStyle[key];
 			}
+
+			state.style = this.graph.postProcessCellStyle(state.style);
 			
 			return state;
 		};

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 549 - 547
src/main/webapp/js/viewer-static.min.js


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 549 - 547
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