ソースを参照

11.2.4 release

David Benson [draw.io] 6 年 前
コミット
36cf86fd99

+ 15 - 0
ChangeLog

@@ -1,3 +1,18 @@
+29-AUG-2019: 11.2.4
+
+- Fixes segment connector rounding issue
+- Updates AWS icons
+- Fixes partial concentric ellipse
+- Fixes search for custom libraries
+- Adds pagecount placeholder
+
+26-AUG-2019: 11.2.3
+
+- Fit window zoom no longer ignores selection
+- Updates page IDs in custom links on import
+- Updates link hint after selection change
+- Updates cell IDs in custom links
+
 23-AUG-2019: 11.2.2
 
 - Add support for loading zipped draw.io and Gliffy formats

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.2.2
+11.2.4

ファイルの差分が大きいため隠しています
+ 17 - 17
etc/mxgraph/mxClient.js


+ 3 - 3
etc/sheetsaddon/Code.gs

@@ -128,7 +128,7 @@ function insertDiagram(id, page, col, row)
   var blob = result[0];
   var w = result[1];
   var h = result[2];
-  var s = result[3];
+  var s = result[3] < 1? 1: result[3];
   var img = null;
   
   if (blob != null)
@@ -366,7 +366,7 @@ function updateDiagram(id, page, scale, elt, pageId)
     var blob = result[0];
     var w = result[1];
     var h = result[2];
-    var s = result[3];
+    var s = result[3] < 1? 1: result[3];
     
     if (blob != null)
     {
@@ -406,7 +406,7 @@ function fetchImage(id, page, scale, pageId)
 		  "format": "png",
           "scale": scale || "1",
 		  "xml": fileData,
-		  "extras": "{\"isPng\": " + isPng + ", \"isGoogleApp\": true}"
+		  "extras": "{\"isPng\": " + isPng + ", \"isGoogleApp\": true, \"isGoogleSheet\": true}"
 		};
     
     	if (pageId != null)

+ 1 - 1
src/main/webapp/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 08/23/2019 04:55 PM
+# 08/29/2019 10:27 AM
 
 app.html
 index.html?offline=1

+ 7 - 21
src/main/webapp/export3.html

@@ -23,6 +23,7 @@
 	<script>
 		var mxIsElectron = navigator.userAgent.toLowerCase().indexOf(' electron/') > -1;
 		var GOOGLE_APPS_MAX_AREA = 25000000;
+		var GOOGLE_SHEET_MAX_AREA = 1048576; //1024x1024
 		
 		Editor.initMath();
 	
@@ -111,27 +112,7 @@
 			{
 				graph.globalUrlVars = extras.globalVars;
 			}
-			
-	        /**
-			 * Implements %page% and %pagenumber% placeholders
-			 */
-			var graphGetGlobalVariable = graph.getGlobalVariable;
-			
-			graph.getGlobalVariable = function(name)
-			{
-				if (name == 'page')
-				{
-					return (diagrams == null) ? 'Page-1' :
-						(diagrams[from].getAttribute('name') || ('Page-' + (from + 1)));
-				}
-				else if (name == 'pagenumber')
-				{
-					return from + 1;
-				}
-				
-				return graphGetGlobalVariable.apply(this, arguments);
-			};
-			
+
 			/**
 			 * Disables custom links on shapes.
 			 */
@@ -485,6 +466,11 @@
 								s = 2;
 							}
 							
+							if (extras != null && extras.isGoogleSheet != null)
+							{
+								GOOGLE_APPS_MAX_AREA = GOOGLE_SHEET_MAX_AREA;
+							}
+							
 							//The image cannot exceed 25 MP to be included in Google Apps
 							if (b.width * s * b.height * s > GOOGLE_APPS_MAX_AREA)
 							{

ファイルの差分が大きいため隠しています
+ 1451 - 1424
src/main/webapp/js/app.min.js


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

@@ -1956,10 +1956,10 @@ App.prototype.getThumbnail = function(width, fn)
 		
 		if (this.pages != null && (this.currentPage != this.pages[0] || darkTheme))
 		{
-			graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());
 			var graphGetGlobalVariable = graph.getGlobalVariable;
+			graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());
 			var page = this.pages[0];
-
+			
 			// Avoids override of stylesheet in getSvg for dark mode
 			if (darkTheme)
 			{
@@ -1979,7 +1979,8 @@ App.prototype.getThumbnail = function(width, fn)
 				
 				return graphGetGlobalVariable.apply(this, arguments);
 			};
-	
+			
+			graph.getGlobalVariable = graphGetGlobalVariable;
 			document.body.appendChild(graph.container);
 			graph.model.setRoot(page.root);
 		}

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

@@ -5363,6 +5363,10 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
 		{
 			return realPage + 1;
 		}
+		else if (name == 'pagecount')
+		{
+			return (diagrams != null) ? diagrams.length : 1;
+		}
 		
 		return graphGetGlobalVariable.apply(this, arguments);
 	};
@@ -5769,9 +5773,9 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
 									try
 									{
 										var temp = parseInt(pageSelect.value);
-										parseDiagram(diagrams[temp]);
 										currentPage = temp;
 										realPage = currentPage;
+										parseDiagram(diagrams[temp]);
 									}
 									catch (e)
 									{
@@ -6038,6 +6042,10 @@ var DraftDialog = function(editorUi, title, xml, editFn, discardFn, editLabel, d
 		{
 			return currentPage + 1;
 		}
+		else if (name == 'pagecount')
+		{
+			return (diagrams != null) ? diagrams.length : 1;
+		}
 		
 		return graphGetGlobalVariable.apply(this, arguments);
 	};

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

@@ -3352,12 +3352,12 @@
 						else if (colorset['fill'] == '')
 						{
 							btn.style.backgroundColor = mxUtils.getValue(graph.defaultVertexStyle,
-								mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#000000' : '#ffffff');
+								mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#2a2a2a' : '#ffffff');
 						}
 						else
 						{
 							btn.style.backgroundColor = colorset['fill'] || mxUtils.getValue(graph.defaultVertexStyle,
-								mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#000000' : '#ffffff');
+								mxConstants.STYLE_FILLCOLOR, (uiTheme == 'dark') ?'#2a2a2a' : '#ffffff');
 						}
 						
 						if (colorset['stroke'] == mxConstants.NONE)
@@ -3367,12 +3367,12 @@
 						else if (colorset['stroke'] == '')
 						{
 							btn.style.border = '1px solid ' + mxUtils.getValue(graph.defaultVertexStyle, 
-								mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#000000' : '#ffffff');
+								mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#2a2a2a' : '#ffffff');
 						}
 						else
 						{
 							btn.style.border = '1px solid ' + (colorset['stroke'] || mxUtils.getValue(graph.defaultVertexStyle,
-									mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#000000' : '#ffffff'));
+									mxConstants.STYLE_STROKECOLOR, (uiTheme != 'dark') ?'#2a2a2a' : '#ffffff'));
 						}
 					}
 					else
@@ -3585,6 +3585,7 @@
 	 * Adds rack child layout style.
 	 */
 	var graphInit = Graph.prototype.init;
+	
 	Graph.prototype.init = function()
 	{
 		graphInit.apply(this, arguments);
@@ -3782,7 +3783,7 @@
 		
 		return this.defaultStylesheet;
 	};
-	
+
 	/**
 	 * Temporarily overrides stylesheet during image export in dark mode.
 	 */
@@ -3865,6 +3866,7 @@
 	 * Sets default style (used in editor.get/setGraphXml below)
 	 */
 	var graphLoadStylesheet = Graph.prototype.loadStylesheet;
+	
 	Graph.prototype.loadStylesheet = function()
 	{
 		graphLoadStylesheet.apply(this, arguments);
@@ -3900,6 +3902,8 @@
 			// Some actions are stateless and must be handled before the transaction
 			var link = JSON.parse(href.substring(17));
 
+			// When adding new actions that reference cell IDs support for updating
+			// those cell IDs must be handled in Graph.updateCustomLinkActions
 			if (link.actions != null)
 			{
 				// Executes open actions before starting transaction
@@ -3984,7 +3988,126 @@
 			}
 		}
 	};
+	
+	/**
+	 * Updates cell IDs in custom links on the given cell and its label.
+	 */
+	Graph.prototype.updateCustomLinksForCell = function(mapping, cell)
+	{
+		var href = this.getLinkForCell(cell);
+		
+		if (href != null && href.substring(0, 17) == 'data:action/json,')
+		{
+			this.setLinkForCell(cell, this.updateCustomLink(mapping, href));
+		}
+		
+		if (this.isHtmlLabel(cell))
+		{
+			var temp = document.createElement('div');
+			temp.innerHTML = this.getLabel(cell);
+			var links = temp.getElementsByTagName('a');
+			var changed = false;
+			
+			for (var i = 0; i < links.length; i++)
+			{
+				href = links[i].getAttribute('href');
+				
+				if (href != null && href.substring(0, 17) == 'data:action/json,')
+				{
+					links[i].setAttribute('href', this.updateCustomLink(mapping, href));
+					changed = true;
+				}
+			}
+			
+			if (changed)
+			{
+				this.labelChanged(cell, temp.innerHTML);
+			}
+		}
+	};
+	
+	/**
+	 * Updates cell IDs in the given custom link and returns the updated link.
+	 */
+	Graph.prototype.updateCustomLink = function(mapping, href)
+	{
+		if (href.substring(0, 17) == 'data:action/json,')
+		{
+			try
+			{
+				// Some actions are stateless and must be handled before the transaction
+				var link = JSON.parse(href.substring(17));
+
+				if (link.actions != null)
+				{
+					this.updateCustomLinkActions(mapping, link.actions);
+					href = 'data:action/json,' + JSON.stringify(link);
+				}
+			}
+			catch (e)
+			{
+				// Ignore
+			}
+		}
+		
+		return href;
+	};
 
+	/**
+	 * Updates cell IDs in the given custom link actions.
+	 */
+	Graph.prototype.updateCustomLinkActions = function(mapping, actions)
+	{
+		for (var i = 0; i < actions.length; i++)
+		{
+			var action = actions[i];
+			
+			this.updateCustomLinkAction(mapping, action.toggle);
+			this.updateCustomLinkAction(mapping, action.show);
+			this.updateCustomLinkAction(mapping, action.hide);
+			this.updateCustomLinkAction(mapping, action.select);
+			this.updateCustomLinkAction(mapping, action.highlight);
+			this.updateCustomLinkAction(mapping, action.scroll);
+		}
+	};
+	
+	/**
+	 * Updates cell IDs in the given custom link action.
+	 */
+	Graph.prototype.updateCustomLinkAction = function(mapping, action)
+	{
+		if (action != null && action.cells != null)
+		{
+			var result = [];
+			
+			for (var i = 0; i < action.cells.length; i++)
+			{
+				if (action.cells[i] == '*')
+				{
+					result.push(action.cells[i]);
+				}
+				else
+				{
+					var temp = mapping[action.cells[i]];
+					
+					if (temp != null)
+					{
+						if (temp != '')
+						{
+							result.push(temp);
+						}
+					}
+					else
+					{
+						result.push(action.cells[i]);
+					}
+				}
+			}
+			
+			action.cells = result;
+		}
+	};
+	
 	/**
 	 * Handles each action in the action array of a custom link. This code
 	 * handles toggle actions for cell IDs.
@@ -4904,6 +5027,10 @@
 							{
 								return i + 1;
 							}
+							else if (name == 'pagecount')
+							{
+								return (editorUi.pages != null) ? editorUi.pages.length : 1;
+							}
 							
 							return graphGetGlobalVariable.apply(this, arguments);
 						};

+ 166 - 119
src/main/webapp/js/diagramly/EditorUi.js

@@ -1323,8 +1323,8 @@
 		if (this.pages != null && this.currentPage != this.pages[0] && (forceSvg ||
 			(!forceXml && file != null && /(\.svg)$/i.test(file.getTitle()))))
 		{
-			graph = this.createTemporaryGraph(graph.getStylesheet());
 			var graphGetGlobalVariable = graph.getGlobalVariable;
+			graph = this.createTemporaryGraph(graph.getStylesheet());
 			var page = this.pages[0];
 	
 			graph.getGlobalVariable = function(name)
@@ -2840,40 +2840,7 @@
 		// KNOWN: Existing entries are not replaced after edit of custom library
 		if (this.sidebar != null && images != null)
 		{
-			for (var i = 0; i < images.length; i++)
-			{
-				(mxUtils.bind(this, function(img)
-				{
-					var data = img.data;
-					
-					if (data != null && img.title != null)
-					{
-						this.sidebar.addEntry(img.title, mxUtils.bind(this, function()
-						{
-							data = this.convertDataUri(data);
-							var s = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;';
-							
-							if (img.aspect == 'fixed')
-							{
-								s += 'aspect=fixed;'
-							}
-							
-							return this.sidebar.createVertexTemplate(s + 'image=' +
-								data, img.w, img.h, '', img.title || '', false, false, true)
-						}));
-					}
-					else if (img.xml != null && img.title != null)
-					{
-						this.sidebar.addEntry(img.title, mxUtils.bind(this, function()
-						{
-							var cells = this.stringToCells(Graph.decompress(img.xml));
-	
-							return this.sidebar.createVertexTemplateFromCells(
-								cells, img.w, img.h, img.title || '', true, false, true);
-						}));
-					}
-				}))(images[i]);
-			}
+			this.sidebar.addEntries(images);
 		}
 		
 		// Adds new sidebar entry for this library
@@ -6826,7 +6793,7 @@
 		var graph = this.editor.graph;
 		var href = graph.getLinkForCell(cell);
 		
-		if (href != null && href.substring(0, 13) == 'data:page/id,')
+		if (href != null)
 		{
 			graph.setLinkForCell(cell, this.updatePageLink(mapping, href));
 		}
@@ -6841,7 +6808,7 @@
 			{
 				href = links[i].getAttribute('href');
 				
-				if (href != null && href.substring(0, 13) == 'data:page/id,')
+				if (href != null)
 				{
 					links[i].setAttribute('href', this.updatePageLink(mapping, href));
 					changed = true;
@@ -6865,9 +6832,48 @@
 	 */
 	EditorUi.prototype.updatePageLink = function(mapping, href)
 	{
-		var newId = mapping[href.substring(href.indexOf(',') + 1)];
+		if (href.substring(0, 13) == 'data:page/id,')
+		{
+			var newId = mapping[href.substring(href.indexOf(',') + 1)];
+			href = (newId != null) ? 'data:page/id,' + newId : null;
+		}
+		else if (href.substring(0, 17) == 'data:action/json,')
+		{
+			try
+			{
+				var link = JSON.parse(href.substring(17));
+
+				if (link.actions != null)
+				{
+					for (var i = 0; i < link.actions.length; i++)
+					{
+						var action = link.actions[i];
+						
+						if (action.open != null && action.open.substring(0, 13) == 'data:page/id,')
+						{
+							var newId = mapping[action.open.substring(action.open.indexOf(',') + 1)];
+							
+							if (newId != null)
+							{
+								action.open = 'data:page/id,' + newId;
+							}
+							else
+							{
+								delete action.open;
+							}
+						}
+					}
+					
+					href = 'data:action/json,' + JSON.stringify(link);
+				}
+			}
+			catch (e)
+			{
+				// Ignore
+			}
+		}
 		
-		return (newId != null) ? 'data:page/id,' + newId : null;
+		return href;
 	};
 	
 	/**
@@ -7531,83 +7537,105 @@
 	{
 		var ui = this;
 		
-		JSZip.loadAsync(file)                                   
-        .then(function(zip) 
-        {
-        	if (Object.keys(zip.files).length == 0)
-        	{
-        		onerror();
-        	}
-        	else
-        	{
-        		var gliffyLatestVer = {version: 0};
-        		var drawioFound = false;
-        		
-                zip.forEach(function (relativePath, zipEntry) 
-                {
-                	var name = zipEntry.name.toLowerCase();
-					
-                    if (name == 'diagram/diagram.xml') //draw.io zip format has the latest diagram version at diagram/diagram.xml
-                    {
-                    	drawioFound = true;
-                    	
-	                    zipEntry.async("string").then(function(str){
-	                    	if (str.indexOf('<mxfile ') == 0)
-	                    	{
-	                    		success(str);
-	                    	}
-	                    	else
-                    		{
-	                    		onerror();
-                    		}
-	                    });
-                    }
-                    else if (name.indexOf('versions/') == 0) //Gliffy zip format has the versions inside versions folder
-                   	{
-                    	var version = parseInt(name.substr(9)); //9 is the length of versions/
-                    	
-                    	if (version > gliffyLatestVer.version)
-                    	{
-                    		gliffyLatestVer = {version: version, zipEntry: zipEntry}
-                    	}
-                   	}
-                });
-                
-                if (gliffyLatestVer.version > 0)
-            	{
-                	gliffyLatestVer.zipEntry.async("string").then(function(data)
-                	{
-                		if (!ui.isOffline() && new XMLHttpRequest().upload && ui.isRemoteFileFormat(data, file.name))
-                		{
-                			ui.parseFile(new Blob([data], {type: 'application/octet-stream'}), mxUtils.bind(this, function(xhr)
-                			{
-                				if (xhr.readyState == 4)
-                				{
-                					if (xhr.status >= 200 && xhr.status <= 299)
-                					{
-                						success(xhr.responseText);
-                					}
-                					else
-                					{
-                						onerror();
-                					}
-                				}
-                			}), file.name);
-                		}
-                		else
-            			{
-                			onerror();
-            			}
-                	});
-            	}
-                else if (!drawioFound)
-            	{
-                	onerror();
-            	}
-        	}
-        }, function (e) {
-    		onerror(e);
-        });                    
+		var delayed = mxUtils.bind(this, function()
+		{
+			this.loadingExtensions = false;
+			
+			if (typeof JSZip  !== 'undefined')
+			{
+				JSZip.loadAsync(file)                                   
+		        .then(function(zip) 
+		        {
+		        	if (Object.keys(zip.files).length == 0)
+		        	{
+		        		onerror();
+		        	}
+		        	else
+		        	{
+		        		var gliffyLatestVer = {version: 0};
+		        		var drawioFound = false;
+		        		
+		                zip.forEach(function (relativePath, zipEntry) 
+		                {
+		                	var name = zipEntry.name.toLowerCase();
+							
+		                    if (name == 'diagram/diagram.xml') //draw.io zip format has the latest diagram version at diagram/diagram.xml
+		                    {
+		                    	drawioFound = true;
+		                    	
+			                    zipEntry.async("string").then(function(str){
+			                    	if (str.indexOf('<mxfile ') == 0)
+			                    	{
+			                    		success(str);
+			                    	}
+			                    	else
+		                    		{
+			                    		onerror();
+		                    		}
+			                    });
+		                    }
+		                    else if (name.indexOf('versions/') == 0) //Gliffy zip format has the versions inside versions folder
+		                   	{
+		                    	var version = parseInt(name.substr(9)); //9 is the length of versions/
+		                    	
+		                    	if (version > gliffyLatestVer.version)
+		                    	{
+		                    		gliffyLatestVer = {version: version, zipEntry: zipEntry}
+		                    	}
+		                   	}
+		                });
+		                
+		                if (gliffyLatestVer.version > 0)
+		            	{
+		                	gliffyLatestVer.zipEntry.async("string").then(function(data)
+		                	{
+		                		if (!ui.isOffline() && new XMLHttpRequest().upload && ui.isRemoteFileFormat(data, file.name))
+		                		{
+		                			ui.parseFile(new Blob([data], {type: 'application/octet-stream'}), mxUtils.bind(this, function(xhr)
+		                			{
+		                				if (xhr.readyState == 4)
+		                				{
+		                					if (xhr.status >= 200 && xhr.status <= 299)
+		                					{
+		                						success(xhr.responseText);
+		                					}
+		                					else
+		                					{
+		                						onerror();
+		                					}
+		                				}
+		                			}), file.name);
+		                		}
+		                		else
+		            			{
+		                			onerror();
+		            			}
+		                	});
+		            	}
+		                else if (!drawioFound)
+		            	{
+		                	onerror();
+		            	}
+		        	}
+		        }, function (e) {
+		    		onerror(e);
+		        }); 
+			}
+			else
+			{
+				onerror();
+			}
+		});
+		
+		if (typeof JSZip === 'undefined' && !this.loadingExtensions && !this.isOffline(true))
+		{
+			this.loadingExtensions = true;
+			mxscript('js/extensions.min.js', delayed);
+		}
+		else
+		{
+			delayed();
+		}
 	};
 	
 	/**
@@ -8529,7 +8557,7 @@
 			
 			return done;
 		};
-		
+
 		// Extends clear default style to clear persisted settings
 		var clearDefaultStyle = this.clearDefaultStyle;
 		
@@ -8632,8 +8660,23 @@
 
 		// Specifies the default filename
 		this.defaultFilename = mxResources.get('untitledDiagram');
+
+		// Adds export for %page%, %pagenumber% and %pagecount% placeholders
+		var graphGetExportVariables = graph.getExportVariables;
 		
-		// Adds placeholder for %page% and %pagenumber%
+		graph.getExportVariables = function()
+		{
+			var vars = graphGetExportVariables.apply(this, arguments);
+			
+			vars['pagecount'] = (ui.pages != null) ? ui.pages.length : 1;
+			vars['page'] = (ui.currentPage != null) ? ui.currentPage.getName() : '';
+			vars['pagenumber'] = (ui.pages != null && ui.currentPage != null) ?
+				mxUtils.indexOf(ui.pages, ui.currentPage) + 1 : 1;
+			
+			return vars;
+		};
+
+		// Adds %page%, %pagenumber% and %pagecount% placeholders
 		var graphGetGlobalVariable = graph.getGlobalVariable;
 		
 		graph.getGlobalVariable = function(name)
@@ -8653,6 +8696,10 @@
 					return 1;
 				}
 			}
+			else if (name == 'pagecount')
+			{
+				return (ui.pages != null) ? ui.pages.length : 1;
+			}
 			
 			return graphGetGlobalVariable.apply(this, arguments);
 		};
@@ -10734,8 +10781,8 @@
 								// LATER: Add caching for the graph or SVG while not on first page
 								if (this.pages != null && this.currentPage != this.pages[0])
 								{
-									graph = this.createTemporaryGraph(graph.getStylesheet());
 									var graphGetGlobalVariable = graph.getGlobalVariable;
+									graph = this.createTemporaryGraph(graph.getStylesheet());
 									var page = this.pages[0];
 							
 									graph.getGlobalVariable = function(name)

+ 4 - 0
src/main/webapp/js/diagramly/Embed.js

@@ -220,6 +220,10 @@
 							{
 								return 1;
 							}
+							else if (name == 'pagecount')
+							{
+								return diagrams.length;
+							}
 							
 							return graphGetGlobalVariable.apply(this, arguments);
 						};

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

@@ -143,7 +143,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
 				
 				if (this.graphConfig['toolbar-nohide'] == true)
 				{
-					this.editor.defaultGraphOverflow = 'visible'; 					
+					this.editor.defaultGraphOverflow = 'visible';
 				}
 				
 				//Extract graph model from html & svg formats 
@@ -160,7 +160,7 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
 				if (mxClient.IS_SVG)
 				{
 					// LATER: Add shadow for labels in graph.container (eg. math, NO_FO), scaling
-					this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement, null, true);
+					this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement, null, true);
 				}
 				
 				// Adds page placeholders
@@ -198,6 +198,10 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig)
 							{
 								return self.currentPage + 1;
 							}
+							else if (name == 'pagecount')
+							{
+								return diagrams.length;
+							}
 							
 							return graphGetGlobalVariable.apply(this, arguments);
 						};

+ 133 - 127
src/main/webapp/js/diagramly/Pages.js

@@ -319,137 +319,140 @@ EditorUi.prototype.getPageById = function(id)
  */
 EditorUi.prototype.initPages = function()
 {
-	this.actions.addAction('previousPage', mxUtils.bind(this, function()
+	if (!this.editor.graph.standalone)
 	{
-		this.selectNextPage(false);
-	}));
-	
-	this.actions.addAction('nextPage', mxUtils.bind(this, function()
-	{
-		this.selectNextPage(true);
-	}));
-	
-	this.keyHandler.bindAction(33, true, 'previousPage', true); // Ctrl+Shift+PageUp
-	this.keyHandler.bindAction(34, true, 'nextPage', true); // Ctrl+Shift+PageDown
-	
-	// Updates the tabs after loading the diagram
-	var graph = this.editor.graph;
-	var graphViewValidateBackground = graph.view.validateBackground; 
-	
-	graph.view.validateBackground = mxUtils.bind(this, function()
-	{
-		if (this.tabContainer != null)
+		this.actions.addAction('previousPage', mxUtils.bind(this, function()
 		{
-			var prevHeight = this.tabContainer.style.height;
-			
-			if (this.fileNode == null || this.pages == null ||
-				(this.pages.length == 1 && urlParams['pages'] == '0'))
-			{
-				this.tabContainer.style.height = '0px';
-			}
-			else
-			{
-				this.tabContainer.style.height = this.tabContainerHeight + 'px';
-			}
-			
-			if (prevHeight != this.tabContainer.style.height)
-			{
-				this.refresh(false);
-			}
-		}
+			this.selectNextPage(false);
+		}));
 		
-		graphViewValidateBackground.apply(graph.view, arguments);
-	});
-
-	var lastPage = null;
-	
-	var updateTabs = mxUtils.bind(this, function()
-	{
-		this.updateTabContainer();
+		this.actions.addAction('nextPage', mxUtils.bind(this, function()
+		{
+			this.selectNextPage(true);
+		}));
 		
-		// Updates scrollbar positions and backgrounds after validation	
-		var p = this.currentPage;
+		this.keyHandler.bindAction(33, true, 'previousPage', true); // Ctrl+Shift+PageUp
+		this.keyHandler.bindAction(34, true, 'nextPage', true); // Ctrl+Shift+PageDown
 		
-		if (p != null && p != lastPage)
+		// Updates the tabs after loading the diagram
+		var graph = this.editor.graph;
+		var graphViewValidateBackground = graph.view.validateBackground; 
+		
+		graph.view.validateBackground = mxUtils.bind(this, function()
 		{
-			if (p.viewState == null || p.viewState.scrollLeft == null)
+			if (this.tabContainer != null)
 			{
-				this.resetScrollbars();
-
-				if (graph.isLightboxView())
+				var prevHeight = this.tabContainer.style.height;
+				
+				if (this.fileNode == null || this.pages == null ||
+					(this.pages.length == 1 && urlParams['pages'] == '0'))
+				{
+					this.tabContainer.style.height = '0px';
+				}
+				else
 				{
-					this.lightboxFit();
+					this.tabContainer.style.height = this.tabContainerHeight + 'px';
 				}
 				
-				if (this.chromelessResize != null)
+				if (prevHeight != this.tabContainer.style.height)
 				{
-					graph.container.scrollLeft = 0;
-					graph.container.scrollTop = 0;
-					this.chromelessResize();
+					this.refresh(false);
 				}
 			}
-			else
-			{
-				graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + p.viewState.scrollLeft;
-				graph.container.scrollTop = graph.view.translate.y * graph.view.scale + p.viewState.scrollTop;
-			}
 			
-			lastPage = p;
-		}
-		
-		// Updates layers window
-		if (this.actions.layersWindow != null)
-		{
-			this.actions.layersWindow.refreshLayers();
-		}
+			graphViewValidateBackground.apply(graph.view, arguments);
+		});
+	
+		var lastPage = null;
 		
-		// Workaround for math if tab is switched before typesetting has stopped
-		if (typeof(MathJax) !== 'undefined' && typeof(MathJax.Hub) !== 'undefined')
+		var updateTabs = mxUtils.bind(this, function()
 		{
-			// Pending math should not be rendered if the graph has no math enabled
-			if (MathJax.Hub.queue.pending == 1 && this.editor != null && !this.editor.graph.mathEnabled)
+			this.updateTabContainer();
+			
+			// Updates scrollbar positions and backgrounds after validation	
+			var p = this.currentPage;
+			
+			if (p != null && p != lastPage)
 			{
-				// Since there is no way to stop/undo mathjax or
-				// clear the queue we have to refresh after typeset
-				MathJax.Hub.Queue(mxUtils.bind(this, function()
+				if (p.viewState == null || p.viewState.scrollLeft == null)
 				{
-					if (this.editor != null)
+					this.resetScrollbars();
+	
+					if (graph.isLightboxView())
 					{
-						this.editor.graph.refresh();
+						this.lightboxFit();
 					}
-				}));
+					
+					if (this.chromelessResize != null)
+					{
+						graph.container.scrollLeft = 0;
+						graph.container.scrollTop = 0;
+						this.chromelessResize();
+					}
+				}
+				else
+				{
+					graph.container.scrollLeft = graph.view.translate.x * graph.view.scale + p.viewState.scrollLeft;
+					graph.container.scrollTop = graph.view.translate.y * graph.view.scale + p.viewState.scrollTop;
+				}
+				
+				lastPage = p;
 			}
-		}
-		else if (typeof(Editor.MathJaxClear) !== 'undefined' && (this.editor == null || !this.editor.graph.mathEnabled))
-		{
-			// Clears our own queue for async loading
-			Editor.MathJaxClear();
-		}
-	});
-	
-	// Adds a graph model listener to update the view
-	this.editor.graph.model.addListener(mxEvent.CHANGE, mxUtils.bind(this, function(sender, evt)
-	{
-		var edit = evt.getProperty('edit');
-		var changes = edit.changes;
+			
+			// Updates layers window
+			if (this.actions.layersWindow != null)
+			{
+				this.actions.layersWindow.refreshLayers();
+			}
+			
+			// Workaround for math if tab is switched before typesetting has stopped
+			if (typeof(MathJax) !== 'undefined' && typeof(MathJax.Hub) !== 'undefined')
+			{
+				// Pending math should not be rendered if the graph has no math enabled
+				if (MathJax.Hub.queue.pending == 1 && this.editor != null && !this.editor.graph.mathEnabled)
+				{
+					// Since there is no way to stop/undo mathjax or
+					// clear the queue we have to refresh after typeset
+					MathJax.Hub.Queue(mxUtils.bind(this, function()
+					{
+						if (this.editor != null)
+						{
+							this.editor.graph.refresh();
+						}
+					}));
+				}
+			}
+			else if (typeof(Editor.MathJaxClear) !== 'undefined' && (this.editor == null || !this.editor.graph.mathEnabled))
+			{
+				// Clears our own queue for async loading
+				Editor.MathJaxClear();
+			}
+		});
 		
-		for (var i = 0; i < changes.length; i++)
+		// Adds a graph model listener to update the view
+		this.editor.graph.model.addListener(mxEvent.CHANGE, mxUtils.bind(this, function(sender, evt)
 		{
-			if (changes[i] instanceof SelectPage ||
-				changes[i] instanceof RenamePage ||
-				changes[i] instanceof MovePage ||
-				changes[i] instanceof mxRootChange)
+			var edit = evt.getProperty('edit');
+			var changes = edit.changes;
+			
+			for (var i = 0; i < changes.length; i++)
 			{
-				updateTabs();
-				break;	
+				if (changes[i] instanceof SelectPage ||
+					changes[i] instanceof RenamePage ||
+					changes[i] instanceof MovePage ||
+					changes[i] instanceof mxRootChange)
+				{
+					updateTabs();
+					break;	
+				}
 			}
+		}));
+		
+		// Updates zoom in toolbar
+		if (this.toolbar != null)
+		{
+			this.editor.addListener('pageSelected', this.toolbar.updateZoom);
 		}
-	}));
-	
-	// Updates zoom in toolbar
-	if (this.toolbar != null)
-	{
-		this.editor.addListener('pageSelected', this.toolbar.updateZoom);
 	}
 };
 
@@ -733,30 +736,33 @@ EditorUi.prototype.selectPage = function(page, quiet, viewState)
 {
 	try
 	{
-		if (this.editor.graph.isEditing())
+		if (page != this.currentPage)
 		{
-			this.editor.graph.stopEditing(false);
-		}
-		
-		quiet = (quiet != null) ? quiet : false;
-		this.editor.graph.isMouseDown = false;
-		this.editor.graph.reset();
-		
-		var edit = this.editor.graph.model.createUndoableEdit();
-		
-		// Special flag to bypass autosave for this edit
-		edit.ignoreEdit = true;
-	
-		var change = new SelectPage(this, page, viewState);
-		change.execute();
-		edit.add(change);
-		edit.notify();
-		
-		this.editor.graph.tooltipHandler.hide();
+			if (this.editor.graph.isEditing())
+			{
+				this.editor.graph.stopEditing(false);
+			}
+			
+			quiet = (quiet != null) ? quiet : false;
+			this.editor.graph.isMouseDown = false;
+			this.editor.graph.reset();
+			
+			var edit = this.editor.graph.model.createUndoableEdit();
+			
+			// Special flag to bypass autosave for this edit
+			edit.ignoreEdit = true;
 		
-		if (!quiet)
-		{
-			this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));
+			var change = new SelectPage(this, page, viewState);
+			change.execute();
+			edit.add(change);
+			edit.notify();
+			
+			this.editor.graph.tooltipHandler.hide();
+			
+			if (!quiet)
+			{
+				this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO, 'edit', edit));
+			}
 		}
 	}
 	catch (e)

+ 88 - 3
src/main/webapp/js/diagramly/sidebar/Sidebar-AWS4.js

@@ -85,6 +85,8 @@
 		[
 			 this.createVertexTemplateEntry(n3 + 'resourceIcon;resIcon=' + gn + '.marketplace;',
 					 s * 78, s * 78, '', 'Marketplace', null, null, this.getTagsForStencil(gn, 'marketplace', dt).join(' ')),
+			 this.createVertexTemplateEntry(n3 + 'resourceIcon;resIcon=' + gn + '.general;',
+					 s * 78, s * 78, '', 'General', null, null, this.getTagsForStencil(gn, 'general', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'client;',
 					 s * 78, s * 76, '', 'Client', null, null, this.getTagsForStencil(gn, 'client', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'corporate_data_center;',
@@ -234,6 +236,8 @@
 					 s * 68, s * 78, '', 'Search Documents', null, null, this.getTagsForStencil(gn, 'search documents', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'cluster;',
 					 s * 78, s * 78, '', 'HDFS Cluster', null, null, this.getTagsForStencil(gn, 'hdfs cluster', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'data_lake_resource_icon;',
+					 s * 78, s * 78, '', 'Data Lake', null, null, this.getTagsForStencil(gn, 'data lake', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'emr_engine;',
 					 s * 78, s * 59, '', 'EMR Engine', null, null, this.getTagsForStencil(gn, 'emr engine', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'emr_engine_mapr_m3;',
@@ -273,6 +277,8 @@
 					 w2, w2, '', 'Application Integration', null, null, this.getTagsForStencil(gn, 'application integration', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.appsync;',
 					 w2, w2, '', 'AppSync', null, null, this.getTagsForStencil(gn, 'appsync', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.eventbridge;',
+					 w2, w2, '', 'EventBridge', null, null, this.getTagsForStencil(gn, 'eventbridge event bridge', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.step_functions;',
 					 w2, w2, '', 'Step Functions', null, null, this.getTagsForStencil(gn, 'step functions', dt).join(' ')),
 					 
@@ -465,6 +471,20 @@
 					 w2, w2, '', 'Outposts', null, null, this.getTagsForStencil(gn, 'outposts', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.serverless_application_repository;',
 					 w2, w2, '', 'Serverless Application Repository', null, null, this.getTagsForStencil(gn, 'serverless application repository', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_deadline;',
+					 w2, w2, '', 'Thinkbox Deadline', null, null, this.getTagsForStencil(gn, 'thinkbox deadline', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_draft;',
+					 w2, w2, '', 'Thinkbox Draft', null, null, this.getTagsForStencil(gn, 'thinkbox draft', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_frost;',
+					 w2, w2, '', 'Thinkbox Frost', null, null, this.getTagsForStencil(gn, 'thinkbox frost', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_krakatoa;',
+					 w2, w2, '', 'Thinkbox Krakatoa', null, null, this.getTagsForStencil(gn, 'thinkbox krakatoa', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_sequoia;',
+					 w2, w2, '', 'Thinkbox Sequoia', null, null, this.getTagsForStencil(gn, 'thinkbox sequoia', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_stoke;',
+					 w2, w2, '', 'Thinkbox Stoke', null, null, this.getTagsForStencil(gn, 'thinkbox stoke', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.thinkbox_xmesh;',
+					 w2, w2, '', 'Thinkbox XMesh', null, null, this.getTagsForStencil(gn, 'thinkbox xmesh', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.compute;',
 					 w2, w2, '', 'Compute', null, null, this.getTagsForStencil(gn, 'compute', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elastic_load_balancing;',
@@ -562,6 +582,38 @@
 					 s * 78, s * 78, '', 'Attribute', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database attribute', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'attributes;',
 					 s * 78, s * 78, '', 'Attributes', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database attributes', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'aurora_instance;',
+					 s * 78, s * 78, '', 'Aurora Instance', null, null, this.getTagsForStencil(gn, 'aurora instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'aurora_instance_alt;',
+					 s * 78, s * 78, '', 'Aurora Instance', null, null, this.getTagsForStencil(gn, 'aurora instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_instance;',
+					 s * 78, s * 78, '', 'RDS Instance', null, null, this.getTagsForStencil(gn, 'rds instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_instance_alt;',
+					 s * 78, s * 78, '', 'RDS Instance', null, null, this.getTagsForStencil(gn, 'rds instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_mariadb_instance;',
+					 s * 78, s * 78, '', 'RDS MariaDB Instance', null, null, this.getTagsForStencil(gn, 'rds mariadb maria db instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_mariadb_instance_alt;',
+					 s * 78, s * 78, '', 'RDS MariaDB Instance', null, null, this.getTagsForStencil(gn, 'rds mariadb maria db instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_mysql_instance;',
+					 s * 78, s * 78, '', 'RDS MySQL Instance', null, null, this.getTagsForStencil(gn, 'rds mysql instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_mysql_instance_alt;',
+					 s * 78, s * 78, '', 'RDS MySQL Instance', null, null, this.getTagsForStencil(gn, 'rds mysql instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_oracle_instance;',
+					 s * 78, s * 78, '', 'RDS Oracle Instance', null, null, this.getTagsForStencil(gn, 'rds oracle instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_oracle_instance_alt;',
+					 s * 78, s * 78, '', 'RDS Oracle Instance', null, null, this.getTagsForStencil(gn, 'rds oracle instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_piop;',
+					 s * 78, s * 78, '', 'RDS PIOP', null, null, this.getTagsForStencil(gn, 'rds piop', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_postgresql_instance;',
+					 s * 78, s * 78, '', 'RDS PostgreSQL Instance', null, null, this.getTagsForStencil(gn, 'rds postgresql instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_postgresql_instance_alt;',
+					 s * 78, s * 78, '', 'RDS PostgreSQL Instance', null, null, this.getTagsForStencil(gn, 'rds postgresql instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_sql_server_instance;',
+					 s * 78, s * 78, '', 'RDS SQL Server Instance', null, null, this.getTagsForStencil(gn, 'rds sql server instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'rds_sql_server_instance_alt;',
+					 s * 78, s * 78, '', 'RDS SQL Server Instance', null, null, this.getTagsForStencil(gn, 'rds sql server instance', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'dynamodb_dax;',
+					 s * 78, s * 72, '', 'DAX', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database dax', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'global_secondary_index;',
 					 s * 78, s * 78, '', 'Global Secondary Index', null, null, this.getTagsForStencil(gn, 'global secondary index', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'item;',
@@ -614,8 +666,13 @@
 		
 		this.addPaletteFunctions('aws4Developer Tools', 'AWS / Developer Tools', false,
 		[
+			 this.createVertexTemplateEntry(n + 'dynamodb_dax;',
+					 s * 78, s * 72, '', 'DAX', null, null, this.getTagsForStencil(gn, 'dynamodb dynamo db database dax', dt).join(' ')),
+					 
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.cloud9;',
 					 w2, w2, '', 'Cloud9', null, null, this.getTagsForStencil(gn, 'cloud9', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.cloud_development_kit;',
+					 w2, w2, '', 'Cloud Development Kit', null, null, this.getTagsForStencil(gn, 'cloud development kit', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.codebuild;',
 					 w2, w2, '', 'CodeBuild', null, null, this.getTagsForStencil(gn, 'codebuild', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.codecommit;',
@@ -917,6 +974,10 @@
 					 s * 68, s * 78, '', 'Resources', null, null, this.getTagsForStencil(gn, 'opsworks resources', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'stack2;',
 					 s * 78, s * 78, '', 'Stack', null, null, this.getTagsForStencil(gn, 'stack', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'organizations_account;',
+					 s * 74, s * 78, '', 'Organizations Account', null, null, this.getTagsForStencil(gn, 'organizations account', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'organizations_organizational_unit;',
+					 s * 78, s * 67, '', 'Organizations Organizational Unit', null, null, this.getTagsForStencil(gn, 'organizations organizational unit', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'shield_shield_advanced;',
 					 s * 70, s * 78, '', 'Shield Advanced', null, null, this.getTagsForStencil(gn, 'shield advanced', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'automation;',
@@ -944,7 +1005,9 @@
 			 this.createVertexTemplateEntry(n + 'checklist_performance;',
 					 s * 78, s * 78, '', 'Checklist Performance', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist performance', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'checklist_security;',
-					 s * 78, s * 78, '', 'Checklist Security', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist security', dt).join(' '))
+					 s * 78, s * 78, '', 'Checklist Security', null, null, this.getTagsForStencil(gn, 'trusted advisor checklist security', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'systems_manager_opscenter;',
+					 s * 78, s * 78, '', 'Systems Manager OpsCenter', null, null, this.getTagsForStencil(gn, 'systems manager opscenter', dt).join(' '))
 		]);
 	};
 
@@ -972,6 +1035,14 @@
 					 w2, w2, '', 'Elemental MediaStore', null, null, this.getTagsForStencil(gn, 'elemental mediastore', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental_mediatailor;',
 					 w2, w2, '', 'Elemental MediaTailor', null, null, this.getTagsForStencil(gn, 'elemental mediatailor', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
+					 w2, w2, '', 'Elemental Conductor', null, null, this.getTagsForStencil(gn, 'elemental conductor', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
+					 w2, w2, '', 'Elemental Delta', null, null, this.getTagsForStencil(gn, 'elemental delta', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
+					 w2, w2, '', 'Elemental Live', null, null, this.getTagsForStencil(gn, 'elemental live', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.elemental;',
+					 w2, w2, '', 'Elemental Server', null, null, this.getTagsForStencil(gn, 'elemental server', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.media_services;',
 					 w2, w2, '', 'Media Services', null, null, this.getTagsForStencil(gn, 'media services', dt).join(' '))
 		]);
@@ -1115,7 +1186,9 @@
 			 this.createVertexTemplateEntry(n + 'vpn_connection;',
 					 s * 70, s * 78, '', 'VPN Connection', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network connection', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'vpn_gateway;',
-					 s * 78, s * 78, '', 'VPN Gateway', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network gateway', dt).join(' '))
+					 s * 78, s * 78, '', 'VPN Gateway', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud vpn network gateway', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'vpc_traffic_mirroring;',
+					 s * 78, s * 78, '', 'VPC Traffic Mirroring', null, null, this.getTagsForStencil(gn, 'vpc virtual private cloud traffic mirroring', dt).join(' '))
 		]);
 	};
 
@@ -1190,6 +1263,8 @@
 					 w2, w2, '', 'Identity and Access Management', null, null, this.getTagsForStencil(gn, 'identity and access management', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.key_management_service;',
 					 w2, w2, '', 'Key Management Service', null, null, this.getTagsForStencil(gn, 'key management service', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.resource_access_manager;',
+					 w2, w2, '', 'Resource Access Manager', null, null, this.getTagsForStencil(gn, 'resource access manager', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.organizations;',
 					 w2, w2, '', 'Organizations', null, null, this.getTagsForStencil(gn, 'organizations', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.secrets_manager;',
@@ -1205,6 +1280,8 @@
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.security_identity_and_compliance;',
 					 w2, w2, '', 'Security Identity and Compliance', null, null, this.getTagsForStencil(gn, 'security identity and compliance', dt).join(' ')),
 					 
+			 this.createVertexTemplateEntry(n + 'ad_connector;',
+					 s * 78, s * 73, '', 'AD Connector', null, null, this.getTagsForStencil(gn, 'ad connector', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'agent;',
 					 s * 78, s * 74, '', 'Inspector Agent', null, null, this.getTagsForStencil(gn, 'inspector agent', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'certificate_manager_2;',
@@ -1229,6 +1306,8 @@
 					 s * 78, s * 44, '', 'Role', null, null, this.getTagsForStencil(gn, 'identity and access management iam role', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'temporary_security_credential;',
 					 s * 77, s * 78, '', 'Temporary Security Credential', null, null, this.getTagsForStencil(gn, 'identity and access management iam temporary security credential', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'managed_ms_ad;',
+					 s * 78, s * 77, '', 'Managed MS AD', null, null, this.getTagsForStencil(gn, 'managed ms ad', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'organizations_account;',
 					 s * 74, s * 78, '', 'Organizations Account', null, null, this.getTagsForStencil(gn, 'organizations account', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'organizations_organizational_unit;',
@@ -1236,7 +1315,9 @@
 			 this.createVertexTemplateEntry(n + 'shield_shield_advanced;',
 					 s * 70, s * 78, '', 'Shield Advanced', null, null, this.getTagsForStencil(gn, 'shield advanced', dt).join(' ')),
 			 this.createVertexTemplateEntry(n + 'filtering_rule;',
-					 s * 78, s * 78, '', 'Filtering Rule', null, null, this.getTagsForStencil(gn, 'filtering rule', dt).join(' '))
+					 s * 78, s * 78, '', 'Filtering Rule', null, null, this.getTagsForStencil(gn, 'filtering rule', dt).join(' ')),
+			 this.createVertexTemplateEntry(n + 'simple_ad;',
+					 s * 78, s * 77, '', 'Simple AD', null, null, this.getTagsForStencil(gn, 'simple ad', dt).join(' '))
 		]);
 	};
 
@@ -1272,6 +1353,10 @@
 					 w2, w2, '', 'Snowmobile', null, null, this.getTagsForStencil(gn, 'snowmobile', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.storage_gateway;',
 					 w2, w2, '', 'Storage Gateway', null, null, this.getTagsForStencil(gn, 'storage gateway', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.efs_infrequentaccess;',
+					 w2, w2, '', 'EFS InfrequentAccess', null, null, this.getTagsForStencil(gn, 'efs infrequent access', dt).join(' ')),
+			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.efs_standard;',
+					 w2, w2, '', 'EFS Standard', null, null, this.getTagsForStencil(gn, 'efs standard', dt).join(' ')),
 			 this.createVertexTemplateEntry(n2 + 'resourceIcon;resIcon=' + gn + '.storage;',
 					 w2, w2, '', 'Storage', null, null, this.getTagsForStencil(gn, 'storage', dt).join(' ')),
 					 

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

@@ -744,6 +744,7 @@
 							{
 								var dataLoaded = mxUtils.bind(this, function(images)
 								{
+									this.addEntries(images);
 									this.editorUi.addLibraryEntries(images, content);
 								});
 								

+ 4 - 0
src/main/webapp/js/embed.dev.js

@@ -220,6 +220,10 @@
 							{
 								return 1;
 							}
+							else if (name == 'pagecount')
+							{
+								return diagrams.length;
+							}
 							
 							return graphGetGlobalVariable.apply(this, arguments);
 						};

+ 23 - 1
src/main/webapp/js/mxgraph/Actions.js

@@ -619,7 +619,29 @@ Actions.prototype.init = function()
 	}, null, null, Editor.ctrlKey + '+H');
 	this.addAction('zoomIn', function(evt) { graph.zoomIn(); }, null, null, Editor.ctrlKey + ' + (Numpad) / Alt+Mousewheel');
 	this.addAction('zoomOut', function(evt) { graph.zoomOut(); }, null, null, Editor.ctrlKey + ' - (Numpad) / Alt+Mousewheel');
-	this.addAction('fitWindow', function() { graph.fit(); }, null, null, Editor.ctrlKey + '+Shift+H');
+	this.addAction('fitWindow', function()
+	{
+		var bounds = (graph.isSelectionEmpty()) ? graph.getGraphBounds() : graph.getBoundingBox(graph.getSelectionCells());
+		var t = graph.view.translate;
+		var s = graph.view.scale;
+		bounds.width /= s;
+		bounds.height /= s;
+		bounds.x = bounds.x / s - t.x;
+		bounds.y = bounds.y / s - t.y;
+		
+		var cw = graph.container.clientWidth - 10;
+		var ch = graph.container.clientHeight - 10;
+		var scale = Math.floor(20 * Math.min(cw / bounds.width, ch / bounds.height)) / 20;
+		graph.zoomTo(scale);
+
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			graph.container.scrollTop = (bounds.y + t.y) * scale -
+				Math.max((ch - bounds.height * scale) / 2 + 5, 0);
+			graph.container.scrollLeft = (bounds.x + t.x) * scale -
+				Math.max((cw - bounds.width * scale) / 2 + 5, 0);
+		}
+	}, null, null, Editor.ctrlKey + '+Shift+H');
 	this.addAction('fitPage', mxUtils.bind(this, function()
 	{
 		if (!graph.pageVisible)

ファイルの差分が大きいため隠しています
+ 824 - 789
src/main/webapp/js/mxgraph/EditorUi.js


+ 170 - 81
src/main/webapp/js/mxgraph/Graph.js

@@ -138,13 +138,14 @@ mxShape.prototype.getConstraints = function(style, w, h)
 /**
  * Defines graph class.
  */
-Graph = function(container, model, renderHint, stylesheet, themes)
+Graph = function(container, model, renderHint, stylesheet, themes, standalone)
 {
 	mxGraph.call(this, container, model, renderHint, stylesheet);
 	
 	this.themes = themes || this.defaultThemes;
 	this.currentEdgeStyle = mxUtils.clone(this.defaultEdgeStyle);
 	this.currentVertexStyle = mxUtils.clone(this.defaultVertexStyle);
+	this.standalone = (standalone != null) ? standalone : false;
 
 	// Sets the base domain URL and domain path URL for relative links.
 	var b = this.baseUrl;
@@ -1234,6 +1235,13 @@ Graph.prototype.editAfterInsert = false;
  */
 Graph.prototype.builtInProperties = ['label', 'tooltip', 'placeholders', 'placeholder'];
 
+/**
+ * Defines if the graph is part of an EditorUi. If this is false the graph can
+ * be used in an EditorUi instance but will not have a UI added, functions
+ * overridden or event handlers added.
+ */
+Graph.prototype.standalone = false;
+
 /**
  * Installs child layout styles.
  */
@@ -4050,7 +4058,6 @@ HoverIcons.prototype.setCurrentState = function(state)
 
 (function()
 {
-	
 	/**
 	 * Reset the list of processed edges.
 	 */
@@ -5031,6 +5038,52 @@ if (typeof mxVertexHandler != 'undefined')
 			}
 		};
 
+		/**
+		 * Creates lookup from object IDs to cell IDs.
+		 */
+		Graph.prototype.createCellLookup = function(cells, lookup)
+		{
+			lookup = (lookup != null) ? lookup : new Object();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				var cell = cells[i];
+				lookup[mxObjectIdentity.get(cell)] = cell.getId();
+				var childCount = this.model.getChildCount(cell);
+				
+				for (var j = 0; j < childCount; j++)
+				{
+					this.createCellLookup([this.model.getChildAt(cell, j)], lookup);
+				}
+			}
+			
+			return lookup;
+		};
+
+		/**
+		 * Creates lookup from original to cloned cell IDs where mapping is
+		 * the mapping used in cloneCells and lookup is a mapping from
+		 * object IDs to cell IDs.
+		 */
+		Graph.prototype.createCellMapping = function(mapping, lookup, cellMapping)
+		{
+			cellMapping = (cellMapping != null) ? cellMapping : new Object();
+			
+			for (var objectId in mapping)
+			{
+				var cellId = lookup[objectId];
+				
+				if (cellMapping[cellId] == null)
+				{
+					// Uses empty string if clone ID was null which means
+					// the cell was cloned but not inserted into the model.
+					cellMapping[cellId] = mapping[objectId].getId() || '';
+				}
+			}
+			
+			return cellMapping;
+		};
+		
 		/**
 		 * 
 		 */
@@ -5045,11 +5098,16 @@ if (typeof mxVertexHandler != 'undefined')
 			var cells = []
 			
 			// Clones cells to remove invalid edges
-			var layers = tempModel.getChildren(this.cloneCell(
-				tempModel.root, this.isCloneInvalidEdges()));
+			var cloneMap = new Object();
+			var cellMapping = new Object();
+			var layers = tempModel.getChildren(this.cloneCell(tempModel.root,
+				this.isCloneInvalidEdges(), cloneMap));
 			
 			if (layers != null)
 			{
+				// Creates lookup from object IDs to cell IDs
+				var lookup = this.createCellLookup([tempModel.root]);
+				
 				// Uses copy as layers are removed from array inside loop
 				layers = layers.slice();
 	
@@ -5061,6 +5119,10 @@ if (typeof mxVertexHandler != 'undefined')
 					{
 						cells = this.moveCells(tempModel.getChildren(layers[0]),
 							dx, dy, false, this.getDefaultParent());
+						
+						// Imported default default parent maps to local default parent
+						cellMapping[tempModel.getChildAt(tempModel.root, 0).getId()] =
+							this.getDefaultParent().getId();
 					}
 					else
 					{
@@ -5071,6 +5133,10 @@ if (typeof mxVertexHandler != 'undefined')
 						}
 					}
 					
+					// Adds mapping for all cloned entries from imported to local cell ID
+					this.createCellMapping(cloneMap, lookup, cellMapping);
+					this.updateCustomLinks(cellMapping, cells);
+					
 					if (crop)
 					{
 						if (this.isGridEnabled())
@@ -5096,6 +5162,100 @@ if (typeof mxVertexHandler != 'undefined')
 			return cells;
 		};
 		
+		/**
+		 * Translates this point by the given vector.
+		 * 
+		 * @param {number} dx X-coordinate of the translation.
+		 * @param {number} dy Y-coordinate of the translation.
+		 */
+		Graph.prototype.encodeCells = function(cells)
+		{
+			var cloneMap = new Object();
+			var clones = this.cloneCells(cells, null, cloneMap);
+			
+			// Creates a dictionary for fast lookups
+			var dict = new mxDictionary();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				dict.put(cells[i], true);
+			}
+			
+			// Checks for orphaned relative children and makes absolute
+			for (var i = 0; i < clones.length; i++)
+			{
+				var state = this.view.getState(cells[i]);
+				
+				if (state != null)
+				{
+					var geo = this.getCellGeometry(clones[i]);
+					
+					if (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&
+						!dict.get(this.model.getParent(cells[i])))
+					{
+						geo.relative = false;
+						geo.x = state.x / state.view.scale - state.view.translate.x;
+						geo.y = state.y / state.view.scale - state.view.translate.y;
+					}
+				}
+			}
+			
+			var codec = new mxCodec();
+			var model = new mxGraphModel();
+			var parent = model.getChildAt(model.getRoot(), 0);
+			
+			for (var i = 0; i < clones.length; i++)
+			{
+				model.add(parent, clones[i]);
+			}
+
+			this.updateCustomLinks(this.createCellMapping(cloneMap,
+				this.createCellLookup(cells)), clones);
+
+			return codec.encode(model);
+		};
+		
+		/**
+		 * Overrides cloning cells in moveCells.
+		 */
+		var graphMoveCells = Graph.prototype.moveCells;
+		
+		Graph.prototype.moveCells = function(cells, dx, dy, clone, target, evt, mapping)
+		{
+			mapping = (mapping != null) ? mapping : new Object();
+			var result = graphMoveCells.apply(this, arguments);
+			
+			if (clone)
+			{
+				this.updateCustomLinks(this.createCellMapping(mapping,
+						this.createCellLookup(cells)), result);
+			}
+			
+			return result;
+		};
+
+		/**
+		 * Updates cells IDs for custom links in the given cells.
+		 */
+		Graph.prototype.updateCustomLinks = function(mapping, cells)
+		{
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (cells[i] != null)
+				{
+					this.updateCustomLinksForCell(mapping, cells[i]);
+				}
+			}
+		};
+		
+		/**
+		 * Updates cell IDs in custom links on the given cell and its label.
+		 */
+		Graph.prototype.updateCustomLinksForCell = function(mapping, cell)
+		{
+			// Hook for subclassers
+		};
+		
 		/**
 		 * Overrides method to provide connection constraints for shapes.
 		 */
@@ -6394,56 +6554,7 @@ if (typeof mxVertexHandler != 'undefined')
 		{
 			return (mxClient.IS_MAC && mxEvent.isMetaDown(evt)) || mxEvent.isControlDown(evt);
 		};
-		
-		/**
-		 * Translates this point by the given vector.
-		 * 
-		 * @param {number} dx X-coordinate of the translation.
-		 * @param {number} dy Y-coordinate of the translation.
-		 */
-		Graph.prototype.encodeCells = function(cells)
-		{
-			var clones = this.cloneCells(cells);
-			
-			// Creates a dictionary for fast lookups
-			var dict = new mxDictionary();
-			
-			for (var i = 0; i < cells.length; i++)
-			{
-				dict.put(cells[i], true);
-			}
-			
-			// Checks for orphaned relative children and makes absolute
-			for (var i = 0; i < clones.length; i++)
-			{
-				var state = this.view.getState(cells[i]);
-				
-				if (state != null)
-				{
-					var geo = this.getCellGeometry(clones[i]);
-					
-					if (geo != null && geo.relative && !this.model.isEdge(cells[i]) &&
-						!dict.get(this.model.getParent(cells[i])))
-					{
-						geo.relative = false;
-						geo.x = state.x / state.view.scale - state.view.translate.x;
-						geo.y = state.y / state.view.scale - state.view.translate.y;
-					}
-				}
-			}
-			
-			var codec = new mxCodec();
-			var model = new mxGraphModel();
-			var parent = model.getChildAt(model.getRoot(), 0);
-			
-			for (var i = 0; i < cells.length; i++)
-			{
-				model.add(parent, clones[i]);
-			}
 
-			return codec.encode(model);
-		};
-		
 		/**
 		 * Translates this point by the given vector.
 		 * 
@@ -8517,14 +8628,7 @@ if (typeof mxVertexHandler != 'undefined')
 				
 				this.redrawHandles();
 			});
-			
-			this.selectionHandler = mxUtils.bind(this, function(sender, evt)
-			{
-				update();
-			});
-			
-			this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);
-			
+
 			this.changeHandler = mxUtils.bind(this, function(sender, evt)
 			{
 				this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),
@@ -8532,6 +8636,7 @@ if (typeof mxVertexHandler != 'undefined')
 				update();
 			});
 			
+			this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);
 			this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);
 			
 			// Repaint needed when editing stops and no change event is fired
@@ -8664,13 +8769,6 @@ if (typeof mxVertexHandler != 'undefined')
 					this.labelShape.node.style.display = (this.graph.isEnabled() && this.graph.getSelectionCount() < this.graph.graphHandler.maxCells) ? '' : 'none';
 				}
 			});
-	
-			this.selectionHandler = mxUtils.bind(this, function(sender, evt)
-			{
-				update();
-			});
-			
-			this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.selectionHandler);
 			
 			this.changeHandler = mxUtils.bind(this, function(sender, evt)
 			{
@@ -8679,7 +8777,8 @@ if (typeof mxVertexHandler != 'undefined')
 				update();
 				this.redrawHandles();
 			});
-			
+
+			this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.changeHandler);
 			this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler);
 	
 			var link = this.graph.getLinkForCell(this.state.cell);
@@ -8761,14 +8860,9 @@ if (typeof mxVertexHandler != 'undefined')
 				this.linkHint = null;
 			}
 
-			if (this.selectionHandler != null)
-			{
-				this.graph.getSelectionModel().removeListener(this.selectionHandler);
-				this.selectionHandler = null;
-			}
-			
 			if  (this.changeHandler != null)
 			{
+				this.graph.getSelectionModel().removeListener(this.changeHandler);
 				this.graph.getModel().removeListener(this.changeHandler);
 				this.changeHandler = null;
 			}
@@ -8827,15 +8921,10 @@ if (typeof mxVertexHandler != 'undefined')
 				this.linkHint = null;
 			}
 	
-			if (this.selectionHandler != null)
-			{
-				this.graph.getSelectionModel().removeListener(this.selectionHandler);
-				this.selectionHandler = null;
-			}
-	
 			if  (this.changeHandler != null)
 			{
 				this.graph.getModel().removeListener(this.changeHandler);
+				this.graph.getSelectionModel().removeListener(this.changeHandler);
 				this.changeHandler = null;
 			}
 		};

+ 48 - 12
src/main/webapp/js/mxgraph/Sidebar.js

@@ -445,6 +445,47 @@ Sidebar.prototype.addDataEntry = function(tags, width, height, title, data)
 	}));
 };
 
+/**
+ * Adds the give entries to the search index.
+ */
+Sidebar.prototype.addEntries = function(images)
+{
+	for (var i = 0; i < images.length; i++)
+	{
+		(mxUtils.bind(this, function(img)
+		{
+			var data = img.data;
+			
+			if (data != null && img.title != null)
+			{
+				this.addEntry(img.title, mxUtils.bind(this, function()
+				{
+					data = this.editorUi.convertDataUri(data);
+					var s = 'shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;';
+					
+					if (img.aspect == 'fixed')
+					{
+						s += 'aspect=fixed;'
+					}
+					
+					return this.createVertexTemplate(s + 'image=' +
+						data, img.w, img.h, '', img.title || '', false, false, true)
+				}));
+			}
+			else if (img.xml != null && img.title != null)
+			{
+				this.addEntry(img.title, mxUtils.bind(this, function()
+				{
+					var cells = this.editorUi.stringToCells(Graph.decompress(img.xml));
+
+					return this.createVertexTemplateFromCells(
+						cells, img.w, img.h, img.title || '', true, false, true);
+				}));
+			}
+		}))(images[i]);
+	}
+};
+
 /**
  * Hides the current tooltip.
  */
@@ -639,6 +680,7 @@ Sidebar.prototype.addSearchPalette = function(expand)
 	input.style.width = '100%';
 	input.style.outline = 'none';
 	input.style.padding = '6px';
+	input.style.paddingRight = '20px';
 	inner.appendChild(input);
 
 	var cross = document.createElement('img');
@@ -764,6 +806,12 @@ Sidebar.prototype.addSearchPalette = function(expand)
 							active = false;
 							page++;
 							this.insertSearchHint(div, searchTerm, count, page, results, len, more, terms);
+							
+							// Allows to repeat the search
+							if (results.length == 0 && page == 1)
+							{
+								searchTerm = '';
+							}
 
 							if (center.parentNode != null)
 							{
@@ -833,18 +881,6 @@ Sidebar.prototype.addSearchPalette = function(expand)
 		}
 	}));
 	
-	mxEvent.addListener(input, 'focus', function()
-	{
-		input.style.paddingRight = '';
-	});
-	
-	mxEvent.addListener(input, 'blur', function()
-	{
-		input.style.paddingRight = '20px';
-	});
-
-	input.style.paddingRight = '20px';
-	
 	mxEvent.addListener(input, 'keyup', mxUtils.bind(this, function(evt)
 	{
 		if (input.value == '')

ファイルの差分が大きいため隠しています
+ 13 - 13
src/main/webapp/js/shapes.min.js


ファイルの差分が大きいため隠しています
+ 1 - 1
src/main/webapp/js/stencils.min.js


ファイルの差分が大きいため隠しています
+ 998 - 991
src/main/webapp/js/viewer.min.js


+ 4 - 4
src/main/webapp/resources/dia_ru.txt

@@ -238,10 +238,10 @@ errorSavingFileUnknown=Ошибка авторизации на сервере G
 errorSavingFileForbidden=Ошибка сохранения файла. Не хватает прав доступа.
 errorSavingFileNameConflict=Невозможно сохранить диаграмму. Страница уже содержит файл с названием '{1}'.
 errorSavingFileNotFound=Ошибка при сохранении файла. Файл не найден.
-errorSavingFileReadOnlyMode=Невозможно сохранить диаграмму до выхода из режима только для чтения
+errorSavingFileReadOnlyMode=Невозможно сохранить диаграмму. Выйдите из режима "только для чтения"
 errorSavingFileSessionTimeout=Ваша сессия истекла. Для сохранения, пожалуйста, <a target='_blank' href='{1}'>{2}</a> и вернитесь на эту закладку.
 errorSendingFeedback=Ошибка при отправке сообщения обратной связи.
-errorUpdatingPreview=Ошибка при обновлении предпросмотра.
+errorUpdatingPreview=Ошибка при обновлении предварительного просмотра.
 exit=Выйти
 exitGroup=Выйти из группы
 expand=Развернуть
@@ -423,7 +423,7 @@ years=лет
 restartForChangeRequired=Изменения вступят в силу после обновления страницы.
 laneColor=Цвет дорожки
 lastModified=Последнее изменение
-layout=Расположение
+layout=Схемы страниц
 left=Слева
 leftAlign=По левому краю
 leftToRight=Слева направо
@@ -664,7 +664,7 @@ sourceSpacing=Отступ от начального узла
 south=Юг
 software=Программное обеспечение
 space=Пространство
-spacing=Интервал
+spacing=Поля
 specialLink=Специальная ссылка
 standard=Стандарт
 startDrawing=Start drawing

+ 17 - 17
src/main/webapp/shapes/mxInfographic.js

@@ -1,5 +1,5 @@
 /**
- * $Id: mxBasic.js,v 1.5 2016/04/1 12:32:06 mate Exp $
+ * $Id: mxInfographic.js,v 1.5 2016/04/1 12:32:06 mate Exp $
  * Copyright (c) 2006-2018, JGraph Ltd
  */
 //**********************************************************************************************************************************************************
@@ -1765,7 +1765,7 @@ mxShapeInfographicBannerSingleFold.prototype.getConstraints = function(style, w,
 /**
 * Extends mxShape.
 */
-function mxShapeBasicShadedCube(bounds, fill, stroke, strokewidth)
+function mxShapeInfographicShadedCube(bounds, fill, stroke, strokewidth)
 {
 	mxShape.call(this);
 	this.bounds = bounds;
@@ -1778,11 +1778,11 @@ function mxShapeBasicShadedCube(bounds, fill, stroke, strokewidth)
 /**
 * Extends mxShape.
 */
-mxUtils.extend(mxShapeBasicShadedCube, mxActor);
+mxUtils.extend(mxShapeInfographicShadedCube, mxActor);
 
-mxShapeBasicShadedCube.prototype.cst = {SHADED_CUBE : 'mxgraph.infographic.shadedCube'};
+mxShapeInfographicShadedCube.prototype.cst = {SHADED_CUBE : 'mxgraph.infographic.shadedCube'};
 
-mxShapeBasicShadedCube.prototype.customProperties = [
+mxShapeInfographicShadedCube.prototype.customProperties = [
 	{name:'isoAngle', dispName: 'Perspective', type:'float', defVal:15, min:0}
 ];
 
@@ -1791,7 +1791,7 @@ mxShapeBasicShadedCube.prototype.customProperties = [
 * 
 * Paints the vertex shape.
 */
-mxShapeBasicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
+mxShapeInfographicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
 {
 	c.translate(x, y);
 
@@ -1830,9 +1830,9 @@ mxShapeBasicShadedCube.prototype.paintVertexShape = function(c, x, y, w, h)
 	c.fill();
 };
 
-mxCellRenderer.registerShape(mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE, mxShapeBasicShadedCube);
+mxCellRenderer.registerShape(mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE, mxShapeInfographicShadedCube);
 
-Graph.handleFactory[mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE] = function(state)
+Graph.handleFactory[mxShapeInfographicShadedCube.prototype.cst.SHADED_CUBE] = function(state)
 {
 	var handles = [Graph.createHandle(state, ['isoAngle'], function(bounds)
 	{
@@ -1848,7 +1848,7 @@ Graph.handleFactory[mxShapeBasicShadedCube.prototype.cst.SHADED_CUBE] = function
 	return handles;
 };
 
-mxShapeBasicShadedCube.prototype.getConstraints = function(style, w, h)
+mxShapeInfographicShadedCube.prototype.getConstraints = function(style, w, h)
 {
 	var constr = [];
 	var isoAngle = Math.max(0.01, Math.min(94, parseFloat(mxUtils.getValue(this.style, 'isoAngle', this.isoAngle)))) * Math.PI / 200 ;
@@ -1881,7 +1881,7 @@ mxShapeBasicShadedCube.prototype.getConstraints = function(style, w, h)
 /**
 * Extends mxShape.
 */
-function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
+function mxShapeInfographicPartConcEllipse(bounds, fill, stroke, strokewidth)
 {
 	mxShape.call(this);
 	this.bounds = bounds;
@@ -1896,11 +1896,11 @@ function mxShapeBasicPartConcEllipse(bounds, fill, stroke, strokewidth)
 /**
 * Extends mxShape.
 */
-mxUtils.extend(mxShapeBasicPartConcEllipse, mxActor);
+mxUtils.extend(mxShapeInfographicPartConcEllipse, mxActor);
 
-mxShapeBasicPartConcEllipse.prototype.cst = {PART_CONC_ELLIPSE : 'mxgraph.infographic.partConcEllipse'};
+mxShapeInfographicPartConcEllipse.prototype.cst = {PART_CONC_ELLIPSE : 'mxgraph.infographic.partConcEllipse'};
 
-mxShapeBasicPartConcEllipse.prototype.customProperties = [
+mxShapeInfographicPartConcEllipse.prototype.customProperties = [
 	{name:'startAngle', dispName:'Start Angle', min:0, max:1, defVal: 0.25},
 	{name:'endAngle', dispName:'End Angle', min:0, max:1, defVal: 0.1},
 	{name:'arcWidth', dispName:'Arc Width', min:0, max:1, defVal: 0.5}
@@ -1911,7 +1911,7 @@ mxShapeBasicPartConcEllipse.prototype.customProperties = [
 * 
 * Paints the vertex shape.
 */
-mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
+mxShapeInfographicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
 {
 	c.translate(x, y);
 
@@ -2003,9 +2003,9 @@ mxShapeBasicPartConcEllipse.prototype.paintVertexShape = function(c, x, y, w, h)
 	c.fill();
 };
 
-mxCellRenderer.registerShape(mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE, mxShapeBasicPartConcEllipse);
+mxCellRenderer.registerShape(mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE, mxShapeInfographicPartConcEllipse);
 
-Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function(state)
+Graph.handleFactory[mxShapeInfographicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE] = function(state)
 {
 	var handles = [Graph.createHandle(state, ['startAngle'], function(bounds)
 	{
@@ -2065,7 +2065,7 @@ Graph.handleFactory[mxShapeBasicPartConcEllipse.prototype.cst.PART_CONC_ELLIPSE]
 	return handles;
 };
 
-mxShapeBasicPartConcEllipse.prototype.getConstraints = function(style, w, h)
+mxShapeInfographicPartConcEllipse.prototype.getConstraints = function(style, w, h)
 {
 	var constr = [];
 	

ファイルの差分が大きいため隠しています
+ 5304 - 1
src/main/webapp/stencils/aws4.xml