瀏覽代碼

7.3.5 release

Gaudenz Alder 8 年之前
父節點
當前提交
7d2fbc0cc9

+ 7 - 1
ChangeLog

@@ -1,3 +1,9 @@
+01-SEP-2017: 7.3.5
+
+- Improvements for Lucidchart import
+- Hides move icon in tree and flow layouts
+- Fixes collapsible action for multiple selection cells
+
 31-AUG-2017: 7.3.4
 
 - Adds event handling for tree and flow layouts
@@ -5,7 +11,7 @@
 31-AUG-2017: 7.3.3
 
 - Removes footer in Chrome App
-- Improvements for Lucidchart import 
+- Improvements for Lucidchart import
 - Fixes timing issue in number plugin
 
 31-AUG-2017: 7.3.2

+ 1 - 1
VERSION

@@ -1 +1 @@
-7.3.4
+7.3.5

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 08/31/2017 08:38 PM
+# 09/01/2017 02:31 PM
 
 app.html
 index.html?offline=1

文件差異過大導致無法顯示
+ 385 - 385
war/js/app.min.js


文件差異過大導致無法顯示
+ 5 - 5
war/js/atlas-viewer.min.js


文件差異過大導致無法顯示
+ 684 - 679
war/js/atlas.min.js


+ 170 - 14
war/js/diagramly/Extensions.js

@@ -160,12 +160,12 @@
 			'SummingJunctionBlock': s + 'flowchart.or',
 			'DisplayBlock': 'shape=display',
 			'OffPageLinkBlock': 'shape=offPageConnector',
-//			'BraceNoteBlock': 'shape=curlyBracket', //TODO
-			'BraceNoteBlock': cs, //TODO
+			'BraceNoteBlock': cs,
 			'NoteBlock': s + 'flowchart.annotation_1',
 //Containers
-			'AdvancedSwimLaneBlock': 'swimlane', //TODO
-			'AdvancedSwimLaneBlockRotated': 'swimlane;horizontal=0', //TODO
+			'AdvancedSwimLaneBlock': cs,
+			'AdvancedSwimLaneBlockRotated': cs, //TODO
+//			'AdvancedSwimLaneBlockRotated': 'swimlane;horizontal=0', //TODO
 			'RectangleContainerBlock': 'fillColor=none;container=1',
 			'DiamondContainerBlock':  'shape=rhombus;fillColor=none;container=1',
 			'RoundedRectangleContainerBlock': 'fillColor=none;container=1;rounded=1;absoluteArcSize=1;arcSize=24',
@@ -193,7 +193,7 @@
 //Misc
 			'UI2HotspotBlock' : 'opacity=50;strokeColor=none',
 //Android Devices
-			'AndroidDevice' : cs, //TODO
+			'AndroidDevice' : cs,
 //Android Dialogs
 			'AndroidAlertDialog' : cs, //TODO
 			'AndroidDateDialog' : cs, //TODO
@@ -2172,6 +2172,10 @@
 				text = props.Note;
 			}
 		}
+		else if (props.t != null)
+		{
+			text = props;
+		}
 
 		if (text == null && props.TextAreas != null)
 		{
@@ -2243,6 +2247,10 @@
 				}
 			}
 		}
+		else if (properties.m != null)
+		{
+			return properties.m;
+		}
 
 		return null;
 	}
@@ -3212,7 +3220,8 @@
 
 	function addCompositeShape(obj)
 	{
-		var p = getAction(obj).Properties;
+		var a = getAction(obj);
+		var p = a.Properties;
 		var b = p.BoundingBox;
 
 		var w = b.w * scale;
@@ -3222,31 +3231,178 @@
 		
 		v = new mxCell('', new mxGeometry(Math.round(x), Math.round(y), Math.round(w), Math.round(h)), vertexStyle);
 	    v.vertex = true;
-//	    updateCell(v, obj);
 
 		switch (obj.Class)
 		{
 			case 'BraceNoteBlock' :
+				
+				var isRightBrace = false;
+				
+				if (p.BraceDirection != null)
+				{
+					if (p.BraceDirection == 'Right')
+					{
+						isRightBrace = true;
+					}				
+				}
+				
+				var brace = null;
+				var label = null;
+				
+				if (isRightBrace)
+				{
+					brace = new mxCell('', new mxGeometry(w - h * 0.125, 0,	h * 0.125, h), 'shape=curlyBracket;rounded=1;');
+					label = new mxCell('', new mxGeometry(0, 0,	w - h * 0.125, h), 'strokeColor=none;fillColor=none;');
+				}
+				else
+				{
+					brace = new mxCell('', new mxGeometry(0, 0,	h * 0.125, h), 'shape=curlyBracket;rounded=1;flipH=1;');
+					label = new mxCell('', new mxGeometry(h * 0.125, 0,	w - h * 0.125, h), 'strokeColor=none;fillColor=none;');
+				}
+				
 				v.style = "strokeColor=none;fillColor=none;"
+				v.style += 	getRotation(p, a, v); 
 					
-				var brace = new mxCell('', new mxGeometry(0, 0,	h * 0.125, h), 'shape=curlyBracket;rounded=1;flipH=1;');
 				brace.vertex = true;
 				v.insert(brace);
-				
-				var label = new mxCell('', new mxGeometry(h * 0.125, 0,	w - h * 0.125, h), 'strokeColor=none;fillColor=none;');
+
+				brace.style += 	getStrokeColor(p, a) + 
+								getOpacity(p, a) + 
+								getShadow(p) +
+								getStrokeStyle(p) + 
+								getStrokeWidth(p); 
+
+
 				label.vertex = true;
 				label.value = convertText(p);
 				v.insert(label);
 				
-				var a = getAction(obj);
-				
-				//zzz
+				label.style += 	getFontSize(p) +
+								getFontColor(p) + 
+								getFontStyle(p) +
+								getTextAlignment(p, label) + 
+								getTextLeftSpacing(p) +
+								getTextRightSpacing(p) + 
+								getTextTopSpacing(p) +
+								getTextBottomSpacing(p) + 
+								getTextGlobalSpacing(p) +
+								getTextVerticalAlignment(p); 
 				break;
+				
+			case 'AdvancedSwimLaneBlockRotated' :
 			case 'AdvancedSwimLaneBlock' :
+				var lanesNum = 0;
+				
+				if (p.Lanes != null)
+				{
+					lanesNum = p.Lanes.length;
+				}
+
+				v.style = "strokeColor=none;fillColor=none;"
+				var totalOffset = 0; //relative
+				var lane = new Array();
+				
+				for (var i = 0; i < lanesNum; i++)
+				{
+					var currOffset = parseFloat(p.Lanes[i].p);
+					
+					lane.push(new mxCell('', new mxGeometry(w * totalOffset, 0,	w * currOffset, h), 'shape=swimlane;startSize=25;'));
+					
+					lane[i].vertex = true;
+					v.insert(lane[i]);
+					lane[i].value = convertText(p["Lane_" + i]);
+					lane[i].style += 	getFontSize(p["Lane_" + i]) +
+									getFontColor(p["Lane_" + i]) + 
+									getFontStyle(p["Lane_" + i]) +
+									getTextAlignment(p["Lane_" + i], lane[i]) + 
+									getTextLeftSpacing(p["Lane_" + i]) +
+									getTextRightSpacing(p["Lane_" + i]) + 
+									getTextTopSpacing(p["Lane_" + i]) +
+									getTextBottomSpacing(p["Lane_" + i]) + 
+									getTextGlobalSpacing(p["Lane_" + i]) +
+									getTextVerticalAlignment(p["Lane_" + i]) + 
+									getStrokeColor(p, a) + 
+									getOpacity(p, a) + 
+									getRounded(p, a) +
+									getRotation(p, a, lane[i]) + 
+									getFlipH(p) + 
+									getFlipV(p) +
+									getShadow(p) +
+									getFillColor(p, a)  +
+									getStrokeStyle(p) + 
+									getStrokeWidth(p); 
+
+					totalOffset += currOffset;
+				}
+				
 				break;
-			case 'AdvancedSwimLaneBlockRotated' :
+				
 				break;
 			case 'AndroidDevice' :
+				if (p.AndroidDeviceName != null)
+				{
+					
+					v.style = "fillColor=#000000;strokeColor=#000000;";
+					var background = null;
+					var keyboard = null;
+					var statusBar = null;
+					
+					if (p.AndroidDeviceName == 'Tablet' || p.AndroidDeviceName == 'Mini Tablet')
+					{
+						v.style += "shape=mxgraph.android.tab2;"
+						background = new mxCell('', new mxGeometry(w * 0.112, h * 0.077, w * 0.77, h * 0.85), '');
+						
+						if (p.KeyboardShown)
+						{
+							keyboard = new mxCell('', new mxGeometry(w * 0.112, h * 0.727, w * 0.77, h * 0.2), 'shape=mxgraph.android.keyboard;');
+						}
+
+						if (!p.FullScreen)
+						{
+							statusBar = new mxCell('', new mxGeometry(w * 0.112, h * 0.077, w * 0.77, h * 0.03), 'shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize=' + h * 0.015 + ';');
+						}
+					}
+					else if (p.AndroidDeviceName == 'Large Phone' || p.AndroidDeviceName == 'Phone')
+					{
+						v.style += "shape=mxgraph.android.phone2;"
+						background = new mxCell('', new mxGeometry(w * 0.04, h * 0.092, w * 0.92, h * 0.816), '');
+						
+						if (p.KeyboardShown)
+						{
+							keyboard = new mxCell('', new mxGeometry(w * 0.04, h * 0.708, w * 0.92, h * 0.2), 'shape=mxgraph.android.keyboard;');
+						}
+						
+						if (!p.FullScreen)
+						{
+							statusBar = new mxCell('', new mxGeometry(w * 0.04, h * 0.092, w * 0.92, h * 0.03), 'shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize=' + h * 0.015 + ';');
+						}
+					}
+					
+					background.vertex = true;
+					v.insert(background);
+					
+					if (p.Scheme == "Dark")
+					{
+						background.style += "fillColor=#111111;"
+					}
+					else if (p.Scheme == "Light")
+					{
+						background.style += "fillColor=#ffffff;"
+					}
+					
+					if (keyboard != null)
+					{
+						keyboard.vertex = true;
+						v.insert(keyboard);
+					}
+
+					if (statusBar != null)
+					{
+						statusBar.vertex = true;
+						v.insert(statusBar);
+					}
+				}
+				
 				break;
 			case 'AndroidAlertDialog' :
 				break;

+ 24 - 6
war/js/diagramly/Trees.js

@@ -105,7 +105,25 @@ EditorUi.prototype.addTrees = function()
 			var state = graph.view.getState(parent);
 			var style = (pstate != null) ? pstate.style : graph.getCellStyle(parent);
 
-			return style['containerType'] == 'tree';
+			result = style['containerType'] == 'tree';
+		}
+		
+		return result;
+	};
+
+	function hasLayoutParent(cell)
+	{
+		var result = false;
+		
+		if (cell != null)
+		{
+			var parent = model.getParent(cell);
+			var pstate = graph.view.getState(parent);
+			
+			var state = graph.view.getState(parent);
+			var style = (pstate != null) ? pstate.style : graph.getCellStyle(parent);
+			
+			result = style['childLayout'] != null;
 		}
 		
 		return result;
@@ -1076,7 +1094,7 @@ EditorUi.prototype.addTrees = function()
 //				target = model.getTerminal(target, false);
 //			}
 			
-			if (isTreeVertex(target))
+			if (isTreeVertex(target) && !hasLayoutParent(target))
 			{
 				// Gets the subtree from cell downwards
 				graph.traverse(target, true, function(vertex, edge)
@@ -1196,8 +1214,8 @@ EditorUi.prototype.addTrees = function()
 			
 			// Ignores everything but vertices
 			if ((graph.isMouseDown && !mxEvent.isTouchEvent(me.getEvent())) ||
-				graph.isEditing() || (tmp != null &&
-				(!graph.getModel().isVertex(tmp.cell) || !isTreeVertex(me.getCell()))))
+				graph.isEditing() || (tmp != null && (!graph.getModel().isVertex(tmp.cell) ||
+				!isTreeVertex(me.getCell()) || hasLayoutParent(tmp.cell))))
 			{
 				tmp = null;
 			}
@@ -1206,14 +1224,14 @@ EditorUi.prototype.addTrees = function()
 	      	{
 		        	if (this.currentState != null)
 		        	{
-		          		this.dragLeave(me.getEvent(), this.currentState);
+		          	this.dragLeave(me.getEvent(), this.currentState);
 		        	}
 		        
 	        		this.currentState = tmp;
 		        
 		        	if (this.currentState != null)
 		        	{
-		          		this.dragEnter(me.getEvent(), this.currentState);
+		          	this.dragEnter(me.getEvent(), this.currentState);
 		        	}
 	      	}
 	    },

文件差異過大導致無法顯示
+ 1 - 1
war/js/embed-static.min.js


文件差異過大導致無法顯示
+ 106 - 101
war/js/extensions.min.js


+ 1 - 2
war/js/mxgraph/EditorUi.js

@@ -2622,7 +2622,6 @@ EditorUi.prototype.updateActionStates = function()
 	this.actions.get('rotation').setEnabled(vertexSelected);
 	this.actions.get('wordWrap').setEnabled(vertexSelected);
 	this.actions.get('autosize').setEnabled(vertexSelected);
-	this.actions.get('collapsible').setEnabled(vertexSelected);
    	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
 	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1 ||
 		(oneVertexSelected && !graph.isContainer(graph.getSelectionCell())));
@@ -2635,7 +2634,7 @@ EditorUi.prototype.updateActionStates = function()
 	// Updates menu states
    	var state = graph.view.getState(graph.getSelectionCell());
     this.menus.get('navigation').setEnabled(selected || graph.view.currentRoot != null);
-    this.actions.get('collapsible').setEnabled(vertexSelected && graph.getSelectionCount() == 1 &&
+    this.actions.get('collapsible').setEnabled(vertexSelected &&
     	(graph.isContainer(graph.getSelectionCell()) || graph.model.getChildCount(graph.getSelectionCell()) > 0));
     this.actions.get('home').setEnabled(graph.view.currentRoot != null);
     this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);

+ 6 - 3
war/js/mxgraph/Sidebar.js

@@ -2177,8 +2177,10 @@ Sidebar.prototype.dropAndConnect = function(source, targets, direction, dropCell
 				{
 					// Adds parent offset to other nodes
 					var tmpState = graph.view.getState(targetParent);
-					var offset = new mxPoint((tmpState.x / graph.view.scale - graph.view.translate.x),
-							(tmpState.y / graph.view.scale - graph.view.translate.y));
+					var offset = (tmpState.cell != graph.view.currentRoot) ?
+						new mxPoint((tmpState.x / graph.view.scale - graph.view.translate.x),
+						(tmpState.y / graph.view.scale - graph.view.translate.y)) : new mxPoint(0, 0);
+
 					graph.cellsMoved(targets, offset.x, offset.y, null, null, true);
 				}
 			}
@@ -2595,9 +2597,10 @@ Sidebar.prototype.createDragSource = function(elt, dropHandler, preview, cells,
 				var dx = view.translate.x * view.scale;
 				var dy = view.translate.y * view.scale;
 				
-				if (geo2 != null && !geo2.relative && graph.model.isVertex(parent))
+				if (geo2 != null && !geo2.relative && graph.model.isVertex(parent) && parent != view.currentRoot)
 				{
 					var pState = view.getState(parent);
+					
 					dx = pState.x;
 					dy = pState.y;
 				}

文件差異過大導致無法顯示
+ 1 - 1
war/js/reader.min.js


文件差異過大導致無法顯示
+ 5 - 5
war/js/viewer.min.js