Browse Source

6.8.13 release

Former-commit-id: 10299353a56c2f048ae73741dadffdc46a7f8deb
Gaudenz Alder 8 years ago
parent
commit
ca8343b2b7

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+10-JUL-2017: 6.8.13
+
+- Adds Alt+Click to select cells behind cells
+- Uses mxGraph 3.7.5 beta 2
+
 07-JUL-2017: 6.8.12
 
 - Updated translations

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.8.12
+6.8.13

File diff suppressed because it is too large
+ 4 - 3
etc/mxgraph/mxClient.js


+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 07/07/2017 04:39 PM
+# 07/10/2017 04:19 PM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 8 - 7
war/js/app.min.js


File diff suppressed because it is too large
+ 7 - 6
war/js/atlas-viewer.min.js


File diff suppressed because it is too large
+ 50 - 48
war/js/atlas.min.js


+ 76 - 38
war/js/diagramly/vsdx/mxVsdxCanvas2D.js

@@ -630,9 +630,6 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 		var s = this.state;
 		var geo = this.xmGeo;
 
-		var fontSize = this.cellState.style["fontSize"];
-		var fontFamily = this.cellState.style["fontFamily"];
-
 		w = w * s.scale;
 		h = h * s.scale;
 
@@ -650,25 +647,61 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 		};
 		
 		var rowIndex = 0;
-		var calcW = 0, calcH = 0, newLineH = 0;
+		var calcW = 0, calcH = 0, lastW = 0, lastH = 0, lineH = 0;
 		
-		var createTextRow = function(fontColor, fontSize, fontFamily, charSect, textEl, txt) 
+		var createTextRow = function(styleMap, charSect, textEl, txt) 
 		{
-			var strRect = mxUtils.getSizeForString(txt, fontSize, fontFamily, wrap? w : null);
-			calcW = Math.max(calcW, strRect.width);
-			calcH += strRect.height + newLineH;
-			newLineH = 6;
+			var fontSize = styleMap['fontSize'];
+			var fontFamily = styleMap['fontFamily'];
+			
+			var strRect = mxUtils.getSizeForString(txt, fontSize, fontFamily);
+			var wrapped = false;
+			
+			if (wrap && strRect.width > w) 
+			{
+				strRect = mxUtils.getSizeForString(txt, fontSize, fontFamily, w);
+				wrapped = true;
+			}
+
+			if (styleMap['blockElem'])
+			{
+				lastW += strRect.width;
+				calcW = Math.min(Math.max(calcW, lastW), w);
+				lastW = 0;
+				lastH = Math.max(lastH, strRect.height);
+				calcH += lastH + lineH;
+				lineH = lastH;
+				lastH = 0;
+			}
+			else 
+			{
+				lastW += strRect.width;
+				calcW = Math.min(Math.max(calcW, lastW), w);
+				lastH = Math.max(lastH, strRect.height);
+				calcH = Math.max(calcH, lastH);
+			}
 			
 			var charRow = that.createElt("Row");
 			charRow.setAttribute('IX', rowIndex);
 			
 			
-			if (fontColor)	charRow.appendChild(that.createCellElem("Color", fontColor));
+			if (styleMap['fontColor'])	charRow.appendChild(that.createCellElem("Color", styleMap['fontColor']));
 			
 			if (fontSize)	charRow.appendChild(that.createCellElemScaled("Size", fontSize * 0.97)); //the magic number 0.97 is needed such that text do not overflow
 			
 			if (fontFamily)	charRow.appendChild(that.createCellElem("Font", fontFamily));
 			
+			//0x00 No format
+			//0x01 Specifies that the text run has a bold character property. 
+			//0x02 Specifies that the text run has an italic character property. 
+			//0x04 Specifies that the text run has an underline character property. 
+			//0x08 Specifies that the text run has a small caps character property.
+			var style = 0;
+			if (styleMap['bold']) style |= 0x11;	
+			if (styleMap['italic']) style |= 0x22;
+			if (styleMap['underline']) style |= 0x4;
+			
+			charRow.appendChild(that.createCellElem("Style", style));
 			charRow.appendChild(that.createCellElem("Case", "0"));
 			charRow.appendChild(that.createCellElem("Pos", "0"));
 			charRow.appendChild(that.createCellElem("FontScale", "1"));
@@ -679,46 +712,48 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 			var cp = that.createElt("cp");
 			cp.setAttribute('IX', rowIndex++);
 			textEl.appendChild(cp);
-			var txtNode = that.xmlDoc.createTextNode(txt+"\n");  
+			var txtNode = that.xmlDoc.createTextNode(txt + (styleMap['blockElem']? "\n" : ""));  
 			textEl.appendChild(txtNode);
 		};
 
-		var processNodeChildren = function(ch, fontSize, fontFamily) 
+		var processNodeChildren = function(ch, pStyle) 
 		{
+			pStyle = pStyle || {};
 			for (var i=0; i<ch.length; i++) 
 			{
 				if (ch[i].nodeType == 3) 
 				{ //#text
-					var fontColor = that.cellState.style["fontColor"];
-					
-					createTextRow(fontColor, fontSize, fontFamily, charSect, text, ch[i].textContent);
+					var styleMap = {
+						fontColor: pStyle['fontColor'] || that.cellState.style["fontColor"],
+						fontSize: pStyle['fontSize'] || that.cellState.style["fontSize"],
+						fontFamily: pStyle['fontFamily'] || that.cellState.style["fontFamily"],
+						bold: pStyle['bold'],
+						italic: pStyle['italic'],
+						underline: pStyle['underline']
+					};
+					createTextRow(styleMap, charSect, text, ch[i].textContent);
 				} 
 				else if (ch[i].nodeType == 1) 
 				{ //element
 					var chLen = ch[i].childNodes.length;
-					if (chLen > 0 && !(chLen == 1 && ch[i].childNodes[0].nodeType == 3)) 
+					var style = window.getComputedStyle(ch[i], null);
+					var styleMap = {
+						bold: style.getPropertyValue('font-weight') == 'bold' || pStyle['bold'],
+						italic: style.getPropertyValue('font-style') == 'italic' || pStyle['italic'],
+						underline: style.getPropertyValue('text-decoration').indexOf('underline') >= 0 || pStyle['underline'],
+						fontColor: rgb2hex(style.getPropertyValue('color')),
+						fontSize: parseFloat(style.getPropertyValue('font-size')),
+						fontFamily: style.getPropertyValue('font-family').replace(/"/g, ''), //remove quotes
+						blockElem: style.getPropertyValue('display') == 'block'
+					};
+					if (chLen > 0 /*&& !(chLen == 1 && ch[i].childNodes[0].nodeType == 3)*/) 
 					{
-						processNodeChildren(ch[i].childNodes, fontSize, fontFamily);
+						createTextRow(styleMap, charSect, text, ""); //to handle block elements if any
+						processNodeChildren(ch[i].childNodes, styleMap);
 					}
 					else
 					{
-						var style = window.getComputedStyle(ch[i], null);
-						
-						var fontColor = rgb2hex(style.getPropertyValue('color'));
-						
-						var fontSize = style.getPropertyValue('font-size');
-						if (fontSize) 
-						{
-							fontSize = parseFloat(fontSize);
-						}
-						
-						var fontFamily = style.getPropertyValue('font-family');
-						if (fontFamily)	
-						{
-							fontFamily = fontFamily.replace(/"/g, ''); //remove quotes
-						}
-						
-						createTextRow(fontColor, fontSize, fontFamily, charSect, text, ch[i].textContent);
+						createTextRow(styleMap, charSect, text, ch[i].textContent);
 					}
 				}
 			}
@@ -729,14 +764,17 @@ mxVsdxCanvas2D.prototype.text = function(x, y, w, h, str, align, valign, wrap, f
 			//Get the actual HTML label node
 			var ch = this.cellState.text.node.getElementsByTagName('div')[mxClient.NO_FO? 0 : 1].childNodes;
 			
-			processNodeChildren(ch, fontSize, fontFamily);
+			processNodeChildren(ch, {});
     	}
 		else
 		{
 			//If it is not HTML or SVG, we fall back to removing html format
-			var fontColor = this.cellState.style["fontColor"];
-
-			createTextRow(fontColor, fontSize, fontFamily, charSect, text, str);
+			var styleMap = {
+				fontColor: that.cellState.style["fontColor"],
+				fontSize: that.cellState.style["fontSize"],
+				fontFamily: that.cellState.style["fontFamily"]
+			};
+			createTextRow(styleMap, charSect, text, str);
 		}
 		
 		var wShift = 0;

File diff suppressed because it is too large
+ 8 - 7
war/js/embed-static.min.js


+ 8 - 0
war/js/mxgraph/Graph.js

@@ -1206,6 +1206,14 @@ Graph.prototype.isReplacePlaceholders = function(cell)
 		cell.value.getAttribute('placeholders') == '1';
 };
 
+/**
+ * Adds Alt+click to select cells behind cells.
+ */
+Graph.prototype.isTransparentClickEvent = function(evt)
+{
+	return mxEvent.isAltDown(evt);
+};
+
 /**
  * Adds ctrl+shift+connect to disable connections.
  */

File diff suppressed because it is too large
+ 8 - 7
war/js/reader.min.js


File diff suppressed because it is too large
+ 7 - 6
war/js/viewer.min.js


File diff suppressed because it is too large
+ 42 - 41
war/js/vsdx.min.js


+ 13 - 13
war/resources/dia_fa.txt

@@ -4,23 +4,23 @@ aboutDrawio=‫درباره draw.io‬
 accessDenied=‫دسترسی مجاز نیست.‬
 actualSize=‫سایز واقعی‬
 add=‫افزودن‬
-addedFile=Added {1}
+addedFile=‫اضافه شد {1}‬
 addImages=‫افزودن تصاویر‬
 addImageUrl=‫افزودن URL تصویر‬
 addLayer=‫افزودن لایه‬
 addProperty=‫افزودن ویژگی‬
-address=Address
-addToExistingDrawing=‫افزودن به طراحی‌های موجود‬
+address=‫آدرس‬
+addToExistingDrawing=‫افزودن به طراحی موجود‬
 addWaypoint=Add Waypoint
 adjustTo=Adjust to
 advanced=‫پیشرفته‬
 align=‫تراز‬
 alignment=‫هم‌ترازی‬
 allChangesLost=‫تمامی تغییرات از دست خواهند رفت!‬
-allPages=All Pages
-allProjects=All Projects
+allPages=‫همه صفحه ها‬
+allProjects=‫همه پروژه ها‬
 allSpaces=All Spaces
-allTags=All Tags
+allTags=‫همه برچسبها‬
 anchor=Anchor
 android=‫اندروید‬
 angle=‫زاویه‬
@@ -28,15 +28,15 @@ areYouSure=‫آیا مطمئن هستید؟‬
 ensureDataSaved=‫لطفا مطمئن شوید که پیش از بستن، اطلاعات شما ذخیره شده باشد.‬
 allChangesSaved=‫تمامی تغییرات ذخیره شد‬
 allChangesSavedInDrive=‫تمامی تغییرات در Drive ذخیره شد‬
-allowPopups=Allow pop-ups to avoid this dialog.
-alreadyConnected=Nodes already connected
+allowPopups=‫برای ندیدن این پنجره مکالمه، pop-up را فعال کنید‬
+alreadyConnected=‫گره ها قبلاً وصل شده اند‬
 apply=‫اعمال‬
 archiMate21=ArchiMate 2.1
 arrange=‫مرتب‌سازی‬
 arrow=‫پیکان‬
 arrows=‫پیکان‌ها‬
 asNew=‫به‌عنوان جدید‬
-atlas=Atlas
+atlas=‫اطلس‬
 author=‫مولف‬
 authorizationRequired=‫اجازه مورد نیاز است‬
 authorizeThisAppIn=‫اعطای اجازه به این اپ در {1}:‬
@@ -45,7 +45,7 @@ authorizing=‫اجازه‬
 automatic=‫خودکار‬
 autosave=‫ذخیره خودکار‬
 autosize=‫اندازه بصورت خودکار‬
-attachments=Attachments
+attachments=‫پیوست ها‬
 aws=AWS
 aws3d=AWS 3D
 azure=Azure
@@ -58,7 +58,7 @@ blankDiagram=‫صفحه دیاگرام خالی‬
 block=‫بلوک‬
 blockquote=‫نقل قول‬
 blog=‫بلاگ‬
-bold=Bold
+bold=‫ضخیم‬
 bootstrap=Bootstrap
 borderColor=‫رنگ مرز‬
 borderWidth=‫عرض مرز‬
@@ -69,10 +69,10 @@ bottomRight=‫پایین راست‬
 bpmn=BPMN
 browser=‫مرورگر‬
 bulletedList=Bulleted List
-business=Business
+business=‫کار‬
 busy=‫عملیات در حال انجام است‬
 cabinets=Cabinets
-cancel=Cancel
+cancel=‫لغو‬
 center=‫مرکز‬
 cannotLoad=‫تلاش برای لود اطلاعات شکست خورد. لطفا کمی دیرتر دوباره اقدام نمایید.‬
 cannotLogin=‫تلاش برای وارد شدن شکست خورد. لطفا کمی دیرتر دوباره اقدام نمایید.‬