소스 검색

13.4.4 release

Gaudenz Alder 5 년 전
부모
커밋
ae9fb26268

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+15-JUL-2020: 13.4.4
+
+- Fixes shape picker container insert
+- Adds diagram styles
+
 14-JUL-2020: 13.4.3
 
 - Adds shape selection on blue arrow click

+ 1 - 1
VERSION

@@ -1 +1 @@
-13.4.3
+13.4.4

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


+ 44 - 17
src/main/webapp/js/diagramly/Editor.js

@@ -49,18 +49,48 @@
 		{commonStyle: {fontColor: '#095C86', strokeColor: '#AF45ED', fillColor: '#F694C1'},
 			edgeStyle: {strokeColor: '#60E696'}},
 		{commonStyle: {fontColor: '#46495D', strokeColor: '#788AA3', fillColor: '#B2C9AB'}},
-		{commonStyle:  {fontColor: '#5AA9E6', strokeColor: '#FF6392', fillColor: '#FFE45E'}},
+		{commonStyle: {fontColor: '#5AA9E6', strokeColor: '#FF6392', fillColor: '#FFE45E'}},
 		{commonStyle: {fontColor: '#1D3557', strokeColor: '#457B9D', fillColor: '#A8DADC'},	
 			graph: {background: '#F1FAEE'}},
-		{commonStyle:  {fontColor: '#393C56', strokeColor: '#E07A5F', fillColor: '#F2CC8F'},	
+		{commonStyle: {fontColor: '#393C56', strokeColor: '#E07A5F', fillColor: '#F2CC8F'},	
 			graph: {background: '#F4F1DE', gridColor: '#D4D0C0'}},
 		{commonStyle: {fontColor: '#143642', strokeColor: '#0F8B8D', fillColor: '#FAE5C7'},
 			edgeStyle: {strokeColor: '#A8201A'},
 			graph: {background: '#DAD2D8', gridColor: '#ABA4A9'}},
 		{commonStyle: {fontColor: '#FEFAE0', strokeColor: '#DDA15E', fillColor: '#BC6C25'},
 			graph: {background: '#283618', gridColor: '#48632C'}},
-		{commonStyle:  {fontColor: '#E4FDE1', strokeColor: '#028090', fillColor: '#F45B69'},
-			graph: {background: '#114B5F', gridColor: '#0B3240'}}
+		{commonStyle: {fontColor: '#E4FDE1', strokeColor: '#028090', fillColor: '#F45B69'},
+			graph: {background: '#114B5F', gridColor: '#0B3240'}},
+		{},
+		{vertexStyle: {strokeColor: '#D0CEE2', fillColor: '#FAD9D5'},
+			edgeStyle: {strokeColor: '#09555B'},
+			commonStyle: {fontColor: '#1A1A1A'}},
+		{vertexStyle: {strokeColor: '#BAC8D3', fillColor: '#09555B', fontColor: '#EEEEEE'},
+			edgeStyle: {strokeColor: '#0B4D6A'}},
+		{vertexStyle: {strokeColor: '#D0CEE2', fillColor: '#5D7F99'},
+			edgeStyle: {strokeColor: '#736CA8'},
+			commonStyle: {fontColor: '#1A1A1A'}},
+		{vertexStyle: {strokeColor: '#FFFFFF', fillColor: '#182E3E', fontColor: '#FFFFFF'},
+			edgeStyle: {strokeColor: '#23445D'},
+			graph: {background: '#FCE7CD', gridColor: '#CFBDA8'}},
+		{vertexStyle: {strokeColor: '#FFFFFF', fillColor: '#F08E81'},
+			edgeStyle: {strokeColor: '#182E3E'},
+			commonStyle: {fontColor: '#1A1A1A'},
+			graph: {background: '#B0E3E6', gridColor: '#87AEB0'}},
+		{vertexStyle: {strokeColor: '#909090', fillColor: '#F5AB50'},
+			edgeStyle: {strokeColor: '#182E3E'},
+			commonStyle: {fontColor: '#1A1A1A'},
+			graph: {background: '#EEEEEE'}},
+		{vertexStyle: {strokeColor: '#EEEEEE', fillColor: '#56517E', fontColor: '#FFFFFF'},
+			edgeStyle: {strokeColor: '#182E3E'},
+			graph: {background: '#FAD9D5', gridColor: '#BFA6A3'}},
+		{vertexStyle: {strokeColor: '#BAC8D3', fillColor: '#B1DDF0', fontColor: '#182E3E'},
+			edgeStyle: {strokeColor: '#EEEEEE', fontColor: '#FFFFFF'},
+			graph: {background: '#09555B', gridColor: '#13B4C2'}},
+		{vertexStyle: {fillColor: '#EEEEEE', fontColor: '#1A1A1A'},
+			edgeStyle: {fontColor: '#FFFFFF'},
+			commonStyle: {strokeColor: '#FFFFFF'},
+			graph: {background: '#182E3E', gridColor: '#4D94C7'}}
 	];
 	
 	/**
@@ -4829,23 +4859,20 @@
 					}));
 				}))(i);
 				
-				mxEvent.add
-				
 				dots.push(dot);
-				
 				switcher.appendChild(dot);
 			}
 			
 			var setScheme = mxUtils.bind(this, function(index)
 			{
-				if (this.editorUi.currentScheme != null)
+				if (this.format.currentScheme != null)
 				{
-					dots[this.editorUi.currentScheme].style.background = 'transparent';
+					dots[this.format.currentScheme].style.background = 'transparent';
 				}
 				
-				this.editorUi.currentScheme = index;
-				updateScheme(this.defaultColorSchemes[this.editorUi.currentScheme]);
-				dots[this.editorUi.currentScheme].style.background = '#84d7ff';
+				this.format.currentScheme = index;
+				updateScheme(this.defaultColorSchemes[this.format.currentScheme]);
+				dots[this.format.currentScheme].style.background = '#84d7ff';
 			});
 			
 			var updateScheme = mxUtils.bind(this, function(colorsets)
@@ -5008,13 +5035,13 @@
 				}
 			});
 
-			if (this.editorUi.currentScheme == null)
+			if (this.format.currentScheme == null)
 			{
 				setScheme((uiTheme == 'dark') ? 1 : 0);
 			}
 			else
 			{
-				setScheme(this.editorUi.currentScheme);
+				setScheme(this.format.currentScheme);
 			}
 			
 			var bottom = (this.defaultColorSchemes.length <= maxEntries) ? 28 : 8;
@@ -5025,7 +5052,7 @@
 			
 			mxEvent.addListener(left, 'click', mxUtils.bind(this, function()
 			{
-				setScheme(mxUtils.mod(this.editorUi.currentScheme - 1, this.defaultColorSchemes.length));
+				setScheme(mxUtils.mod(this.format.currentScheme - 1, this.defaultColorSchemes.length));
 			}));
 			
 			var right = document.createElement('div');
@@ -5040,7 +5067,7 @@
 			
 			mxEvent.addListener(right, 'click', mxUtils.bind(this, function()
 			{
-				setScheme(mxUtils.mod(this.editorUi.currentScheme + 1, this.defaultColorSchemes.length));
+				setScheme(mxUtils.mod(this.format.currentScheme + 1, this.defaultColorSchemes.length));
 			}));
 			
 			// Hover state
@@ -5059,7 +5086,7 @@
 			addHoverState(left);
 			addHoverState(right);
 			
-			updateScheme(this.defaultColorSchemes[this.editorUi.currentScheme]);
+			updateScheme(this.defaultColorSchemes[this.format.currentScheme]);
 			
 			if (this.defaultColorSchemes.length <= maxEntries)
 			{

+ 5 - 59
src/main/webapp/js/diagramly/Menus.js

@@ -527,75 +527,21 @@
 			}
 		}, null, null, Editor.ctrlKey + '+Shift+M');
 
-		var copiedStyles = ['rounded', 'shadow', 'dashed', 'dashPattern', 'fontFamily', 'fontSize', 'fontColor', 'fontStyle',
-			 				'align', 'verticalAlign', 'strokeColor', 'strokeWidth', 'fillColor', 'gradientColor', 'swimlaneFillColor',
-		                    'textOpacity', 'gradientDirection', 'glass', 'labelBackgroundColor', 'labelBorderColor', 'opacity',
-		                    'spacing', 'spacingTop', 'spacingLeft', 'spacingBottom', 'spacingRight', 'endFill', 'endArrow',
-		                    'endSize', 'targetPerimeterSpacing', 'startFill', 'startArrow', 'startSize', 'sourcePerimeterSpacing',
-		                    'arcSize', 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle', 'disableMultiStroke',
-		                    'disableMultiStrokeFill', 'fillStyle', 'curveFitting', 'simplification', 'comicStyle'];
+		var currentStyle = null;
 		
 		editorUi.actions.addAction('copyStyle', function()
 		{
-			var state = graph.view.getState(graph.getSelectionCell());
-			
-			if (graph.isEnabled() && state != null)
+			if (graph.isEnabled() && !graph.isSelectionEmpty())
 			{
-				editorUi.copiedStyle = mxUtils.clone(state.style);
-				
-				// Handles special case for value "none"
-				var cellStyle = graph.getModel().getStyle(state.cell);
-				var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
-				
-				for (var j = 0; j < tokens.length; j++)
-				{
-					var tmp = tokens[j];
-			 		var pos = tmp.indexOf('=');
-			 					 		
-			 		if (pos >= 0)
-			 		{
-			 			var key = tmp.substring(0, pos);
-			 			var value = tmp.substring(pos + 1);
-			 			
-			 			if (editorUi.copiedStyle[key] == null && value == 'none')
-			 			{
-			 				editorUi.copiedStyle[key] = 'none';
-			 			}
-			 		}
-				}
+				currentStyle = graph.copyStyle(graph.getSelectionCell())
 			}
 		}, null, null, Editor.ctrlKey + '+Shift+C');
 
 		editorUi.actions.addAction('pasteStyle', function()
 		{
-			if (graph.isEnabled() && !graph.isSelectionEmpty() && editorUi.copiedStyle != null)
+			if (graph.isEnabled() && !graph.isSelectionEmpty() && currentStyle != null)
 			{
-				graph.getModel().beginUpdate();
-				
-				try
-				{
-					var cells = graph.getSelectionCells();
-					
-					for (var i = 0; i < cells.length; i++)
-					{
-						var state = graph.view.getState(cells[i]);
-						
-						for (var j = 0; j < copiedStyles.length; j++)
-						{
-							var key = copiedStyles[j];
-							var value = editorUi.copiedStyle[key];
-							
-							if (state.style[key] != value)
-							{
-								graph.setCellStyles(key, value, [cells[i]]);
-							}
-						}
-					}
-				}
-				finally
-				{
-					graph.getModel().endUpdate();
-				}
+				graph.pasteStyle(currentStyle, graph.getSelectionCells())
 			}
 		}, null, null, Editor.ctrlKey + '+Shift+V');
 		

+ 42 - 24
src/main/webapp/js/mxgraph/EditorUi.js

@@ -1197,6 +1197,14 @@ EditorUi.prototype.installShapePicker = function()
 	
 	if (this.hoverIcons != null)
 	{
+		var hoverIconsDrag = this.hoverIcons.drag;
+		
+		this.hoverIcons.drag = function()
+		{
+			ui.hideShapePicker();
+			hoverIconsDrag.apply(this, arguments);
+		};
+		
 		var hoverIconsExecute = this.hoverIcons.execute;
 		
 		this.hoverIcons.execute = function(state, dir, me)
@@ -1237,20 +1245,27 @@ EditorUi.prototype.installShapePicker = function()
 /**
  * Creates a temporary graph instance for rendering off-screen content.
  */
-EditorUi.prototype.showShapePicker = function(x, y, cell, callback)
+EditorUi.prototype.showShapePicker = function(x, y, source, callback)
 {
-	var cells = this.getCellsForShapePicker(cell);
+	var cells = this.getCellsForShapePicker(source);
 	
 	if (cells != null && cells.length > 0)
 	{
 		var ui = this;
 		var graph = this.editor.graph;
 		var div = document.createElement('div');
+		var style = (source != null) ? graph.copyStyle(source) : null;
 	
 		div.className = 'geToolbarContainer geSidebarContainer geSidebar';
 		div.style.cssText = 'position:absolute;left:' + (x - 22) + 'px;top:' +
 			(y - 22) + 'px;width:140px;border-radius:10px;padding:4px;text-align:center;' +
 			'box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;';
+		
+		if (graph.background != null && graph.background != mxConstants.NONE)
+		{
+			div.style.backgroundColor = graph.background;
+		}
+		
 		graph.container.appendChild(div);
 		
 		var addCell = mxUtils.bind(this, function(cell)
@@ -1261,36 +1276,38 @@ EditorUi.prototype.showShapePicker = function(x, y, cell, callback)
 			node.style.cssText = 'position:relative;display:inline-block;position:relative;' +
 				'width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;';
 			div.appendChild(node);
+			
+			if (style != null)
+			{
+				this.sidebar.graph.pasteStyle(style, [cell]);
+			}
 
 			ui.insertHandler([cell], cell.value != '', this.sidebar.graph.model);
 			this.sidebar.createThumb([cell], 25, 25, node, null, true, false, cell.geometry.width, cell.geometry.height);
 
 			mxEvent.addListener(node, 'click', function()
 			{
-				cell.geometry.x = graph.snap(Math.round(x / graph.view.scale) -
-					graph.view.translate.x - cell.geometry.width / 2);
-				cell.geometry.y = graph.snap(Math.round(y / graph.view.scale) -
-					graph.view.translate.y - cell.geometry.height / 2);
-				
-				graph.model.beginUpdate();
-				try
+				if (callback != null)
 				{
-					if (callback != null)
+					callback(cell);
+				}
+				else
+				{
+					cell.geometry.x = graph.snap(Math.round(x / graph.view.scale) -
+						graph.view.translate.x - cell.geometry.width / 2);
+					cell.geometry.y = graph.snap(Math.round(y / graph.view.scale) -
+						graph.view.translate.y - cell.geometry.height / 2);
+					
+					graph.model.beginUpdate();
+					try
 					{
-						callback(cell);
+						graph.addCell(cell);
 					}
-					else
+					finally
 					{
-						graph.addCell(cell);
+						graph.model.endUpdate();
 					}
-				}
-				finally
-				{
-					graph.model.endUpdate();
-				}
-				
-				if (callback == null)
-				{
+					
 					graph.setSelectionCell(cell);
 					graph.scrollCellToVisible(graph.getSelectionCell());
 					graph.startEditingAtCell(cell);
@@ -1305,11 +1322,12 @@ EditorUi.prototype.showShapePicker = function(x, y, cell, callback)
 			addCell(cells[i]);
 		}
 
-		this.shapePickerCallback = callback;
-		this.shapePicker = div;
-
 		graph.tooltipHandler.hideTooltip();
 		this.hideCurrentMenu();
+		this.hideShapePicker();
+		
+		this.shapePickerCallback = callback;
+		this.shapePicker = div;
 	}
 };
 

+ 72 - 4
src/main/webapp/js/mxgraph/Format.js

@@ -5608,6 +5608,7 @@ DiagramStylePanel.prototype.addView = function(div)
 	var opts = document.createElement('div');
 	opts.style.paddingBottom = '12px';
 	opts.style.marginRight = '16px';
+	div.style.paddingTop = '8px';
 	
 	var table = document.createElement('table');
 
@@ -5878,6 +5879,11 @@ DiagramStylePanel.prototype.addView = function(div)
 			graph2.model.endUpdate();
 		}
 	});
+	
+	// Entries
+	var entries = document.createElement('div');
+	entries.style.position = 'relative';
+	div.appendChild(entries);
 
 	var addEntry = mxUtils.bind(this, function(commonStyle, vertexStyle, edgeStyle, graphStyle)
 	{
@@ -5995,13 +6001,75 @@ DiagramStylePanel.prototype.addView = function(div)
 			graph.refresh();
 		}));
 		
-		div.appendChild(panel);
+		entries.appendChild(panel);
 	});
+		
+	// Maximum palettes to switch the switcher
+	var maxEntries = 10;
+	var pageCount = Math.ceil(Editor.styles.length / maxEntries);
+	this.format.currentStylePage = (this.format.currentStylePage != null) ? this.format.currentStylePage : 0;
+	var dots = [];
 	
-	for (var i = 0; i < Editor.styles.length; i++)
+	var addEntries = mxUtils.bind(this, function()
+	{
+		if (dots.length > 0)
+		{
+			dots[this.format.currentStylePage].style.background = '#84d7ff';
+		}
+		
+		for (var i = this.format.currentStylePage * maxEntries;
+			i < Math.min((this.format.currentStylePage + 1) * maxEntries,
+			Editor.styles.length); i++)
+		{
+			var s = Editor.styles[i];
+			addEntry(s.commonStyle, s.vertexStyle, s.edgeStyle, s.graph);
+		}
+	});
+	
+	if (pageCount > 1)
+	{
+		// Selector
+		var switcher = document.createElement('div');
+		switcher.style.whiteSpace = 'nowrap';
+		switcher.style.position = 'relative';
+		switcher.style.textAlign = 'center';
+		switcher.style.paddingTop = '4px';
+		div.style.paddingBottom = '8px';
+		
+		for (var i = 0; i < pageCount; i++)
+		{
+			var dot = document.createElement('div');
+			dot.style.display = 'inline-block';
+			dot.style.width = '6px';
+			dot.style.height = '6px';
+			dot.style.marginLeft = '4px';
+			dot.style.marginRight = '3px';
+			dot.style.borderRadius = '3px';
+			dot.style.cursor = 'pointer';
+			dot.style.background = 'transparent';
+			dot.style.border = '1px solid #b5b6b7';
+			
+			(mxUtils.bind(this, function(index, elt)
+			{
+				mxEvent.addListener(dot, 'click', mxUtils.bind(this, function()
+				{
+					dots[this.format.currentStylePage].style.background = 'transparent';
+					entries.innerHTML = '';
+					this.format.currentStylePage = index;
+					addEntries();
+				}));
+			}))(i, dot);
+			
+			switcher.appendChild(dot);
+			dots.push(dot);
+		}
+		
+		div.appendChild(switcher);
+		addEntries();
+	}
+	else
 	{
-		var s = Editor.styles[i];
-		addEntry(s.commonStyle, s.vertexStyle, s.edgeStyle, s.graph);
+		addEntries();
 	}
 	
 	return div;

+ 171 - 79
src/main/webapp/js/mxgraph/Graph.js

@@ -1188,6 +1188,17 @@ Graph.foreignObjectWarningText = 'Viewer does not support full SVG 1.1';
  */
 Graph.foreignObjectWarningLink = 'https://desk.draw.io/support/solutions/articles/16000042487';
 
+/**
+ * Minimum height for table rows.
+ */
+Graph.pasteStyles = ['rounded', 'shadow', 'dashed', 'dashPattern', 'fontFamily', 'fontSize', 'fontColor', 'fontStyle',
+					'align', 'verticalAlign', 'strokeColor', 'strokeWidth', 'fillColor', 'gradientColor', 'swimlaneFillColor',
+					'textOpacity', 'gradientDirection', 'glass', 'labelBackgroundColor', 'labelBorderColor', 'opacity',
+					'spacing', 'spacingTop', 'spacingLeft', 'spacingBottom', 'spacingRight', 'endFill', 'endArrow',
+					'endSize', 'targetPerimeterSpacing', 'startFill', 'startArrow', 'startSize', 'sourcePerimeterSpacing',
+					'arcSize', 'comic', 'sketch', 'fillWeight', 'hachureGap', 'hachureAngle', 'jiggle', 'disableMultiStroke',
+					'disableMultiStrokeFill', 'fillStyle', 'curveFitting', 'simplification', 'comicStyle'];
+
 /**
  * Helper function for creating SVG data URI.
  */
@@ -1649,7 +1660,75 @@ Graph.prototype.init = function(container)
 		
 		return cell;
 	};
+		
+	/**
+	 * Returns true if fast zoom preview should be used.
+	 */
+	Graph.prototype.copyStyle = function(cell)
+	{
+		var style = null;
+		
+		if (cell != null)
+		{
+			style = mxUtils.clone(this.getCurrentCellStyle(cell));
+			
+			// Handles special case for value "none"
+			var cellStyle = this.model.getStyle(cell);
+			var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
+			
+			for (var j = 0; j < tokens.length; j++)
+			{
+				var tmp = tokens[j];
+		 		var pos = tmp.indexOf('=');
+		 					 		
+		 		if (pos >= 0)
+		 		{
+		 			var key = tmp.substring(0, pos);
+		 			var value = tmp.substring(pos + 1);
+		 			
+		 			if (style[key] == null && value == mxConstants.NONE)
+		 			{
+		 				style[key] = mxConstants.NONE;
+		 			}
+		 		}
+			}
+		}
+		
+		return style;
+	};
+	
+	/**
+	 * Returns true if fast zoom preview should be used.
+	 */
+	Graph.prototype.pasteStyle = function(style, cells, keys)
+	{
+		keys = (keys != null) ? keys : Graph.pasteStyles;
+		
+		this.model.beginUpdate();
+		try
+		{
+			for (var i = 0; i < cells.length; i++)
+			{
+				var temp = this.getCurrentCellStyle(cells[i]);
 	
+				for (var j = 0; j < keys.length; j++)
+				{
+					var current = temp[keys[j]];
+					var value = style[keys[j]];
+					
+					if (current != value && (current != null || value != mxConstants.NONE))
+					{
+						this.setCellStyles(keys[j], value, [cells[i]]);
+					}
+				}
+			}
+		}
+		finally
+		{
+			this.model.endUpdate();
+		}
+	};
+
 	/**
 	 * Returns true if fast zoom preview should be used.
 	 */
@@ -2810,11 +2889,12 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	}
 	
 	// Checks actual end point of edge for target cell
-	var target = (ignoreCellAt || (mxEvent.isControlDown(evt) && !forceClone)) ?
-		null : this.getCellAt(dx + pt.x * s, dy + pt.y * s);
+	var target = (ignoreCellAt) ? null : this.getCellAt(dx + pt.x * s, dy + pt.y * s);
+	var keepParent = false;
 	
-	if (this.model.isAncestor(target, source))
+	if (target != null && this.model.isAncestor(target, source))
 	{
+		keepParent = true;
 		target = null;
 	}
 	
@@ -2890,104 +2970,116 @@ Graph.prototype.connectVertex = function(source, direction, length, evt, forceCl
 	
 	var execute = mxUtils.bind(this, function(targetCell)
 	{
-		this.model.beginUpdate();
-		try
+		if (createTarget == null || targetCell != null)
 		{
-			if (realTarget == null && duplicate)
+			this.model.beginUpdate();
+			try
 			{
-				// Handles relative children
-				var cellToClone = (targetCell != null) ? targetCell : source;
-				var geo = this.getCellGeometry(cellToClone);
+				if (realTarget == null && duplicate)
+				{
+					// Handles relative children
+					var cellToClone = (targetCell != null) ? targetCell : source;
+					var geo = this.getCellGeometry(cellToClone);
+					
+					while (geo != null && geo.relative)
+					{
+						cellToClone = this.getModel().getParent(cellToClone);
+						geo = this.getCellGeometry(cellToClone);
+					}
+					
+					// Handles composite cells for cloning
+					cellToClone = this.getCompositeParent(cellToClone);
+					realTarget = (targetCell != null) ? targetCell : this.duplicateCells([cellToClone], false)[0];
+					
+					if (targetCell != null)
+					{
+						this.addCells([realTarget], this.model.getParent(source), null, null, null, true);
+					}
+					
+					var geo = this.getCellGeometry(realTarget);
+	
+					if (geo != null)
+					{
+						geo.x = pt.x - geo.width / 2;
+						geo.y = pt.y - geo.height / 2;
+					}
+
+					if (swimlane)
+					{
+						this.addCells([realTarget], target, null, null, null, true);
+						target = null;
+					}
+					else if (duplicate && target == null && !keepParent)
+					{
+						this.addCells([realTarget], this.getDefaultParent(), null, null, null, true);
+					}
+				}
 				
-				while (geo != null && geo.relative)
+				// Never connects children in stack layouts
+				var layout = null;
+		
+				if (this.layoutManager != null)
 				{
-					cellToClone = this.getModel().getParent(cellToClone);
-					geo = this.getCellGeometry(cellToClone);
+					layout = this.layoutManager.getLayout(this.model.getParent(source));
 				}
+		
+				var edge = ((mxEvent.isControlDown(evt) && mxEvent.isShiftDown(evt) && duplicate) ||
+					(target == null && layout != null && layout.constructor == mxStackLayout)) ? null :
+					this.insertEdge(this.model.getParent(source), null, '', source, realTarget, this.createCurrentEdgeStyle());
+		
+				// Inserts edge before source
+				if (edge != null && this.connectionHandler.insertBeforeSource)
+				{
+					var index = null;
+					var tmp = source;
+					
+					while (tmp.parent != null && tmp.geometry != null &&
+						tmp.geometry.relative && tmp.parent != edge.parent)
+					{
+						tmp = this.model.getParent(tmp);
+					}
 				
-				// Handles composite cells for cloning
-				cellToClone = this.getCompositeParent(cellToClone);
-				realTarget = this.duplicateCells([cellToClone], false)[0];
+					if (tmp != null && tmp.parent != null && tmp.parent == edge.parent)
+					{
+						var index = tmp.parent.getIndex(tmp);
+						this.model.add(tmp.parent, edge, index);
+					}
+				}
 				
-				var geo = this.getCellGeometry(realTarget);
+				// Special case: Click on west icon puts clone before cell
+				if (target == null && realTarget != null && layout != null && source.parent != null &&
+					layout.constructor == mxStackLayout && direction == mxConstants.DIRECTION_WEST)
+				{
+					var index = source.parent.getIndex(source);
+					this.model.add(source.parent, realTarget, index);
+				}
 				
-				if (geo != null)
+				if (edge != null)
 				{
-					geo.x = pt.x - geo.width / 2;
-					geo.y = pt.y - geo.height / 2;
+					result.push(edge);
 				}
 				
-				if (swimlane || targetCell != null)
+				if (target == null && realTarget != null)
 				{
-					this.addCells([realTarget], target, null, null, null, true);
-					target = null;
+					result.push(realTarget);
 				}
-			}
-			
-			// Never connects children in stack layouts
-			var layout = null;
-	
-			if (this.layoutManager != null)
-			{
-				layout = this.layoutManager.getLayout(this.model.getParent(source));
-			}
-	
-			var edge = ((mxEvent.isControlDown(evt) && mxEvent.isShiftDown(evt) && duplicate) ||
-				(target == null && layout != null && layout.constructor == mxStackLayout)) ? null :
-				this.insertEdge(this.model.getParent(source), null, '', source, realTarget, this.createCurrentEdgeStyle());
-	
-			// Inserts edge before source
-			if (edge != null && this.connectionHandler.insertBeforeSource)
-			{
-				var index = null;
-				var tmp = source;
 				
-				while (tmp.parent != null && tmp.geometry != null &&
-					tmp.geometry.relative && tmp.parent != edge.parent)
+				if (realTarget == null && edge != null)
 				{
-					tmp = this.model.getParent(tmp);
+					edge.geometry.setTerminalPoint(pt, false);
 				}
-			
-				if (tmp != null && tmp.parent != null && tmp.parent == edge.parent)
+				
+				if (edge != null)
 				{
-					var index = tmp.parent.getIndex(tmp);
-					this.model.add(tmp.parent, edge, index);
+					this.fireEvent(new mxEventObject('cellsInserted', 'cells', [edge]));
 				}
 			}
-			
-			// Special case: Click on west icon puts clone before cell
-			if (target == null && realTarget != null && layout != null && source.parent != null &&
-				layout.constructor == mxStackLayout && direction == mxConstants.DIRECTION_WEST)
-			{
-				var index = source.parent.getIndex(source);
-				this.model.add(source.parent, realTarget, index);
-			}
-			
-			if (edge != null)
-			{
-				result.push(edge);
-			}
-			
-			if (target == null && realTarget != null)
-			{
-				result.push(realTarget);
-			}
-			
-			if (realTarget == null && edge != null)
-			{
-				edge.geometry.setTerminalPoint(pt, false);
-			}
-			
-			if (edge != null)
+			finally
 			{
-				this.fireEvent(new mxEventObject('cellsInserted', 'cells', [edge]));
+				this.model.endUpdate();
 			}
 		}
-		finally
-		{
-			this.model.endUpdate();
-		}
-		
+			
 		if (done != null)
 		{
 			done(result);

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


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


+ 1 - 1
src/main/webapp/service-worker.js

@@ -6,7 +6,7 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "a8fa137840b7ae79e23008940db6f095"
+    "revision": "78e00fca1f842a747fb1385f0b553fe5"
   },
   {
     "url": "js/extensions.min.js",