Bladeren bron

7.3.6 release

Former-commit-id: 3af1a8738645bb0d805e77633ba142dd427c3e08
Gaudenz Alder 8 jaren geleden
bovenliggende
commit
83b06360bb

+ 9 - 0
ChangeLog

@@ -1,3 +1,12 @@
+07-SEP-2017: 7.3.6
+
+- Fixes overridden paths for folding icons
+- Fixes subtree folding in viewer
+- Fixes disabled state for edit data action
+- Fixes footer plugin in chromeless mode
+- Adds CSS style for read-only status
+- Fixes possible editing for read-only files
+
 01-SEP-2017: 7.3.5
 
 - Improvements for Lucidchart import

+ 1 - 1
VERSION

@@ -1 +1 @@
-7.3.5
+7.3.6

+ 7 - 2
etc/build/build.xml

@@ -42,8 +42,12 @@
 	<target name="app" depends="merge">
 		<delete file="${basedir}/.tmp0.js"/>
 		<echo file="${basedir}/.tmp0.js">
-			var mxBasePath = 'https://www.draw.io/mxgraph/';
-			var mxLoadStylesheets = false;
+			if (typeof window.mxBasePath === 'undefined')
+			{
+				window.mxBasePath = 'https://www.draw.io/mxgraph/';
+			}
+			
+			window.mxLoadStylesheets = window.mxLoadStylesheets || false;
 		</echo>
 
 		<delete file="${basedir}/.tmp1.js"/>
@@ -165,6 +169,7 @@
 				<file name="Editor.js" />
 				<file name="EditorUi.js" />
 				<file name="Pages.js" />
+				<file name="Trees.js" />
 			</sources>
 					
 			<sources dir="${basedir}">

+ 3 - 5
src/com/mxgraph/io/gliffy/importer/DashStyleMapping.java

@@ -1,10 +1,8 @@
 package com.mxgraph.io.gliffy.importer;
 
-import java.util.Arrays;
-
 public class DashStyleMapping
 {
-	public static String get(String value)
+	public static String get(String value, int width)
 	{
 		if (value == null)
 		{
@@ -17,7 +15,7 @@ public class DashStyleMapping
 		{
 			for (int i = 0; i < pattern.length; i++)
 			{
-				pattern[i] = String.valueOf(Integer.parseInt(pattern[i]) * 7);
+				pattern[i] = String.valueOf(Double.parseDouble(pattern[i]) * width);
 			}
 		} 
 		catch (Exception e) 
@@ -25,7 +23,7 @@ public class DashStyleMapping
 			// ignore
 		}
 		
-		StringBuilder mxPattern = new StringBuilder("dashed=1;dashPattern=");
+		StringBuilder mxPattern = new StringBuilder("dashed=1;fixDash=1;dashPattern=");
 		String space = "";
 		
 		//No join in Java 7!

+ 4 - 5
src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java

@@ -404,10 +404,9 @@ public class GliffyDiagramConverter
 				if (!gliffyObject.isVennCircle())
 				{
 					style.append("opacity=" + shape.opacity * 100).append(";");
-					style.append(DashStyleMapping.get(shape.dashStyle));
 				}
 				
-				style.append(DashStyleMapping.get(shape.dashStyle));
+				style.append(DashStyleMapping.get(shape.dashStyle, 1));
 				
 				if(gliffyObject.isSubRoutine()) 
 				{
@@ -420,13 +419,13 @@ public class GliffyDiagramConverter
 				GliffyLine line = graphic.Line;
 				
 				cell.setEdge(true);
-				style.append("shape=filledEdge;fixDash=1;");
+				style.append("shape=filledEdge;");
 				style.append("strokeWidth=" + line.strokeWidth).append(";");
 				style.append("strokeColor=" + line.strokeColor).append(";");
 				style.append("fillColor=" + line.fillColor).append(";");
 				style.append(ArrowMapping.get(line.startArrow).toString(true)).append(";");
 				style.append(ArrowMapping.get(line.endArrow).toString(false)).append(";");
-				style.append(DashStyleMapping.get(line.dashStyle));
+				style.append(DashStyleMapping.get(line.dashStyle, line.strokeWidth));
 				style.append(LineMapping.get(line.interpolationType));
 
 				geometry.setX(0);
@@ -548,7 +547,7 @@ public class GliffyDiagramConverter
 			style.append("strokeWidth=" + mindmap.strokeWidth).append(";");
 			style.append("fillColor=" + mindmap.fillColor).append(";");
 			style.append("strokeColor=" + mindmap.strokeColor).append(";");
-			style.append(DashStyleMapping.get(mindmap.dashStyle));
+			style.append(DashStyleMapping.get(mindmap.dashStyle, 1));
 
 			if (mindmap.gradient)
 			{

+ 3 - 3
src/com/mxgraph/io/gliffy/importer/gliffyTranslation.properties

@@ -340,7 +340,7 @@ com.gliffy.shape.bpmn.bpmn_v1.activities.task=ext;rounded=1
 # BPMN v1 DATA ARTIFACTS
 com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.annotation=mxgraph.flowchart.annotation_1;strokeWidth=2;html=1
 com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.data_object=note;size=25
-com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.group=rect;dashed=1;fillColor=none;dashPattern=8 3 2 3
+com.gliffy.shape.bpmn.bpmn_v1.data_artifacts.group=rect;dashed=1;fillColor=none;dashPattern=8 3 2 3;fixDash=1
 # BPMN v1 GATEWAYS
 com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway=rhombus
 com.gliffy.shape.bpmn.bpmn_v1.gateways.gateway_xor_data=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;outline=none;symbol=exclusiveGw
@@ -1575,9 +1575,9 @@ com.gliffy.stencil.loop_combined_fragment.uml_v2=rect;shadow=0;fillColor=none;st
 com.gliffy.stencil.opt_combined_fragment.uml_v2=rect;shadow=0;fillColor=none;strokeColor=none;opacity=0
 com.gliffy.stencil.interaction_use.uml_v2=rect;shadow=0;fillColor=none;strokeColor=none;opacity=0
 com.gliffy.stencil.rectangle.no_fill_no_line_v1=rect;fillColor=none;strokeColor=none
-com.gliffy.stencil.alt_combined_fragment.dotted_line_area_v1=partialRectangle;top=0;right=0;left=0;fillColor=none;dashed=1;dashPattern=10 4;shadow=0
+com.gliffy.stencil.alt_combined_fragment.dotted_line_area_v1=partialRectangle;top=0;right=0;left=0;fillColor=none;dashed=1;dashPattern=10 4;shadow=0;fixDash=1
 com.gliffy.stencil.rectangle.no_fill_line_bottom_v1=partialRectangle;top=0;right=0;left=0;fillColor=none
-com.gliffy.stencil.rectangle.no_fill_line_bottom_dashed_v1=partialRectangle;top=0;right=0;left=0;fillColor=none;dashed=1;dashPattern=10 4;shadow=0
+com.gliffy.stencil.rectangle.no_fill_line_bottom_dashed_v1=partialRectangle;top=0;right=0;left=0;fillColor=none;dashed=1;dashPattern=10 4;shadow=0;fixDash=1
 com.gliffy.stencil.boundary_lifeline.uml_v2=umlBoundary
 com.gliffy.stencil.object_timeline.uml_v1=line;direction=south;dashed=1
 com.gliffy.stencil.control_lifeline.uml_v2=umlControl

+ 28 - 0
src/com/mxgraph/online/ImportServlet.java

@@ -0,0 +1,28 @@
+package com.mxgraph.online;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+@SuppressWarnings("serial")
+public class ImportServlet extends HttpServlet
+{
+
+	@Override
+	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException 
+	{
+		if(!req.getRemoteHost().endsWith("atlassian.net")) 
+		{
+			
+		} 
+		else 
+		{
+			System.out.println(req);
+		}
+	}
+
+	
+}

+ 1 - 1
war/cache.manifest

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

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


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


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


+ 5 - 3
war/js/diagramly/App.js

@@ -529,9 +529,12 @@ App.main = function(callback)
 		{
 			var plugins = mxSettings.getPlugins();
 			var temp = urlParams['p'];
-			
 			App.initPluginCallback();
-			mxscript(App.FOOTER_PLUGIN_URL);
+			
+			if (urlParams['chrome'] != '0')
+			{
+				mxscript(App.FOOTER_PLUGIN_URL);
+			}
 			
 			if (temp != null)
 			{
@@ -4130,7 +4133,6 @@ App.prototype.descriptorChanged = function()
 		if (urlParams['rev'] == null)
 		{
 			this.updateDocumentTitle();
-			
 			var newHash = file.getHash();
 			
 			if (newHash.length > 0)

+ 2 - 1
war/js/diagramly/DriveRealtime.js

@@ -830,7 +830,8 @@ DriveRealtime.prototype.updateStatus = function()
 			}
 			
 			this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get('lastChange', [str])) +
-				(this.file.isEditable() ? '' : ' (' + mxUtils.htmlEntities(mxResources.get('readOnly')) + ')'));
+				(this.file.isEditable() ? '' : '<span class="geStatusAlert" style="margin-left:8px;">' +
+				mxUtils.htmlEntities(mxResources.get('readOnly')) + '</span>'));
 		}
 	}
 };

+ 8 - 18
war/js/diagramly/EditorUi.js

@@ -1264,12 +1264,13 @@
 				this.setCurrentFile(file);
 				file.addListener('descriptorChanged', this.descriptorChangedListener);
 				file.addListener('contentChanged', this.descriptorChangedListener);
-				this.descriptorChanged();
 				file.open();
 				
+				// DescriptorChanged updates the enabled state of the graph
 				this.setGraphEnabled(true);
 				this.setMode(file.getMode());
 				this.editor.undoManager.clear();
+				this.descriptorChanged();
 				this.updateUi();
 				
 				// Realtime files have a valid status message
@@ -1277,7 +1278,8 @@
 				{
 					if (!file.isEditable())
 					{
-						this.editor.setStatus(mxUtils.htmlEntities(mxResources.get('readOnly')));
+						this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">' +
+							mxUtils.htmlEntities(mxResources.get('readOnly')) + '</span>');
 					}
 					else
 					{
@@ -1359,8 +1361,8 @@
 				{
 			        	try
 			        	{
-							var img = new Image();
-							var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
+						var img = new Image();
+						var logDomain = window.DRAWIO_LOG_URL != null ? window.DRAWIO_LOG_URL : '';
 				    		img.src = logDomain + '/log?v=' + encodeURIComponent(EditorUi.VERSION) +
 				    			'&msg=errorInFileLoaded:url:' + encodeURIComponent(window.location.href) +
 			    				((e != null && e.message != null) ? ':err:' + encodeURIComponent(e.message) : '') +
@@ -5131,19 +5133,6 @@
 				try
 				{
 					this.insertLucidChart(data, dx, dy, crop, done);
-					
-					if (this.updateAd != null && !this.lucidchartTweetShown && urlParams['embed'] != '1')
-					{
-						this.adsHtml.push('<a title="' + mxResources.get('loveIt', ['draw.io']) +
-							'" target="_blank" href="https://twitter.com/intent/tweet?text=' +
-							encodeURIComponent('I\'ve just copy and pasted my Lucidchart diagram into www.draw.io') +
-							'" onclick="javascript:window.open(this.href, \'\', \'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,' +
-							'left=\'+((screen.width-640)/2)+\',top=\'+((screen.height-280)/3)+\',height=280,width=640\');return false;"\'>' +
-							'<img border="0" width="18" height="18" align="absmiddle" style="margin-top:-2px;padding-right:8px;" src="' +
-							Editor.tweetImage + '"/>Paste from Lucidchart?</a>');
-						this.updateAd(this.adsHtml.length - 1, 200);
-						this.lucidchartTweetShown = true;
-					}
 				}
 				catch (e)
 				{
@@ -9474,10 +9463,11 @@
 		var graph = this.editor.graph;
 		var file = this.getCurrentFile();
 		var active = (file != null && file.isEditable()) || 
-			(urlParams['embed'] == '1'  && this.editor.graph.isEnabled());
+			(urlParams['embed'] == '1' && this.editor.graph.isEnabled());
 		this.actions.get('pageSetup').setEnabled(active);
 		this.actions.get('autosave').setEnabled(file != null && file.isEditable() && file.isAutosaveOptional());
 		this.actions.get('guides').setEnabled(active);
+		this.actions.get('editData').setEnabled(active);
 		this.actions.get('shadowVisible').setEnabled(active);
 		this.actions.get('connectionArrows').setEnabled(active);
 		this.actions.get('connectionPoints').setEnabled(active);

File diff suppressed because it is too large
+ 1238 - 59
war/js/diagramly/Extensions.js


File diff suppressed because it is too large
+ 1163 - 1151
war/js/diagramly/Trees.js


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


File diff suppressed because it is too large
+ 107 - 55
war/js/extensions.min.js


+ 19 - 17
war/js/mxgraph/Shapes.js

@@ -2309,42 +2309,44 @@
 			c.setStrokeColor(this.stroke);
 			c.rect(x, y, w, h);
 			c.fill();
+
+			c.begin();
+			c.moveTo(x, y);
 			
 			if (mxUtils.getValue(this.style, 'top', '1') == '1')
 			{
-				c.begin();
-				c.moveTo(x, y);
 				c.lineTo(x + w, y);
-				c.end();
-				c.stroke();
+			}
+			else
+			{
+				c.moveTo(x + w, y);
 			}
 			
 			if (mxUtils.getValue(this.style, 'right', '1') == '1')
 			{
-				c.begin();
-				c.moveTo(x + w, y);
 				c.lineTo(x + w, y + h);
-				c.end();
-				c.stroke();
+			}
+			else
+			{
+				c.moveTo(x + w, y + h);
 			}
 			
 			if (mxUtils.getValue(this.style, 'bottom', '1') == '1')
 			{
-				c.begin();
-				c.moveTo(x + w, y + h);
 				c.lineTo(x, y + h);
-				c.end();
-				c.stroke();
+			}
+			else
+			{
+				c.moveTo(x, y + h);
 			}
 			
 			if (mxUtils.getValue(this.style, 'left', '1') == '1')
 			{
-				c.begin();
-				c.moveTo(x, y + h);
-				c.lineTo(x, y);
-				c.end();
-				c.stroke();
+				c.lineTo(x, y - this.strokewidth / 2);
 			}
+						
+			c.end();
+			c.stroke();
 		}
 	};
 

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


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


+ 1 - 9
war/stencils.xml

@@ -1682,6 +1682,7 @@
         <fillcolor color="#33b5e5"/>
         <roundrect arcsize="11.76" h="17" w="37" x="41" y="1.5"/>
         <fillstroke/>
+        <fontsize size="10"/>
         <fontcolor color="#ffffff"/>
         <text str="ON" valign="middle" align="center" x="58" y="10"/>
     </foreground>
@@ -177194,7 +177195,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -177329,7 +177329,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -177486,7 +177485,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -177885,7 +177883,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -178221,7 +178218,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -178243,7 +178239,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -178505,8 +178500,6 @@
         </path>
     </background>
     <foreground>
-        <fillcolor color="none"/>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -178955,7 +178948,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>

+ 1 - 0
war/stencils/android/android.xml

@@ -1680,6 +1680,7 @@
         <fillcolor color="#33b5e5"/>
         <roundrect arcsize="11.76" h="17" w="37" x="41" y="1.5"/>
         <fillstroke/>
+        <fontsize size="10"/>
         <fontcolor color="#ffffff"/>
         <text str="ON" valign="middle" align="center" x="58" y="10"/>
     </foreground>

+ 0 - 9
war/stencils/ios7/misc.xml

@@ -259,7 +259,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -394,7 +393,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -551,7 +549,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -950,7 +947,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -1286,7 +1282,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -1308,7 +1303,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -1570,8 +1564,6 @@
         </path>
     </background>
     <foreground>
-        <fillcolor color="none"/>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>
@@ -2020,7 +2012,6 @@
         </path>
     </background>
     <foreground>
-        <strokewidth width="2"/>
         <stroke/>
     </foreground>
 </shape>