Gaudenz Alder vor 6 Jahren
Ursprung
Commit
34365cbbe5

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+20-AUG-2019: 11.2.1
+
+- Fixes possible NPEs
+
 20-AUG-2019: 11.2.0
 
 - Adds ruler and units

+ 1 - 1
VERSION

@@ -1 +1 @@
-11.2.0
+11.2.1

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

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 08/20/2019 05:20 PM
+# 08/20/2019 06:38 PM
 
 app.html
 index.html?offline=1

Datei-Diff unterdrückt, da er zu groß ist
+ 16 - 18
src/main/webapp/js/app.min.js


+ 1 - 1
src/main/webapp/js/diagramly/DriveClient.js

@@ -16,7 +16,7 @@ DriveClient = function(editorUi)
 	this.mimeType = 'application/vnd.jgraph.mxfile.realtime';
 	
 	// Reading files now possible with no initial click in drive
-	if (this.ui.editor.chromeless && !this.ui.editor.editable)
+	if (this.ui.editor.chromeless && !this.ui.editor.editable && urlParams['rt'] != '1')
 	{
 		this.appId = '850530949725';
 		this.clientId = '850530949725.apps.googleusercontent.com';

+ 13 - 11
src/main/webapp/js/diagramly/EditorUi.js

@@ -8720,18 +8720,20 @@
 			}));
 		}
 		
-		//Adding mxRuler to editor
-		var view = this.editor.graph.view;
-		
-		view.setUnit(mxSettings.getUnit());
-		
-		view.addListener('unitChanged', function(sender, evt)
+		// Adding mxRuler to editor
+		if (typeof window.mxSettings !== 'undefined')
 		{
-			mxSettings.setUnit(evt.getProperty('unit'));
-			mxSettings.save();		
-		});
-		
-		this.ruler = mxSettings.isRulerOn()? new mxDualRuler(this, view.unit) : null;
+			var view = this.editor.graph.view;
+			view.setUnit(mxSettings.getUnit());
+			
+			view.addListener('unitChanged', function(sender, evt)
+			{
+				mxSettings.setUnit(evt.getProperty('unit'));
+				mxSettings.save();		
+			});
+			
+			this.ruler = mxSettings.isRulerOn()? new mxDualRuler(this, view.unit) : null;
+		}
 		
 		// Adds an element to edit the style in the footer in test mode
 		if (urlParams['styledev'] == '1')

+ 0 - 45
src/main/webapp/js/mxgraph/Editor.js

@@ -1589,11 +1589,6 @@ var PageSetupDialog = function(editorUi)
 		{
 			graph.model.execute(change);
 		}
-		
-		if (unitSelect != null)
-		{
-			graph.view.setUnit(parseInt(unitSelect.value));
-		}
 	});
 	applyBtn.className = 'geBtn gePrimaryBtn';
 	td.appendChild(applyBtn);
@@ -1904,46 +1899,6 @@ PageSetupDialog.getFormats = function()
 	        {key: 'custom', title: mxResources.get('custom'), format: null}];
 };
 
-PageSetupDialog.addUnitPanel = function(div, unit, unitListener)
-{
-	var unitSelect = document.createElement('select');
-	unitSelect.style.marginBottom = '8px';
-	unitSelect.style.width = '202px';
-
-	var units = PageSetupDialog.getUnits();
-	
-	for (var i = 0; i < units.length; i++)
-	{
-		var u = units[i];
-
-		var unitOption = document.createElement('option');
-		unitOption.setAttribute('value', u.unit);
-		mxUtils.write(unitOption, mxResources.get(u.key, null, u.title));
-		unitSelect.appendChild(unitOption);
-	}
-
-	div.appendChild(unitSelect);
-	
-	unitSelect.value = unit;
-	
-	if (unitListener != null)
-	{
-		mxEvent.addListener(unitSelect, 'change', function(evt)
-		{
-			unitListener(parseInt(unitSelect.value));
-		});
-	}
-	
-	return unitSelect;
-};
-
-PageSetupDialog.getUnits = function()
-{
-	return [{key: 'point', title: 'Point', unit: mxConstants.POINTS},
-	        {key: 'inch', title: 'Inch', unit: mxConstants.INCHES},
-	        {key: 'mm', title: 'MM', unit: mxConstants.MILLIMETERS}];
-};
-
 /**
  * Static overrides
  */

Datei-Diff unterdrückt, da er zu groß ist
+ 267 - 269
src/main/webapp/js/viewer.min.js