Fix IE11 problem with default function param

This commit is contained in:
Unick Soft 2019-03-13 21:45:28 +02:00
parent e1058bbedf
commit 344191ea5f
5 changed files with 60 additions and 10 deletions

View File

@ -720,13 +720,23 @@ Application.prototype.GetAdjacencyMatrix = function ()
return this.graph.GetAdjacencyMatrixStr();
}
Application.prototype.TestAdjacencyMatrix = function (matrix, rowsObj, colsObj, separator = ",")
Application.prototype.TestAdjacencyMatrix = function (matrix, rowsObj, colsObj, separator)
{
if(separator === undefined)
{
separator = ",";
}
return this.graph.TestAdjacencyMatrix(matrix, rowsObj, colsObj, separator);
}
Application.prototype.SetAdjacencyMatrix = function (matrix, separator = ",")
Application.prototype.SetAdjacencyMatrix = function (matrix, separator)
{
if(separator === undefined)
{
separator = ",";
}
var res = true;
var r = {};
var c = {};
@ -778,8 +788,13 @@ Application.prototype.Test = function ()
Application.prototype.SetAdjacencyMatrixSmart = function (matrix, separator = ",")
Application.prototype.SetAdjacencyMatrixSmart = function (matrix, separator)
{
if (separator === undefined)
{
separator = ",";
}
var res = false;
if (this.TestAdjacencyMatrix(matrix, {}, {}, separator))
{

View File

@ -82,8 +82,13 @@ var selectedEdgeStyles = [new SelectedEdgeStyle0(), new SelectedEdgeStyle1(),
new SelectedEdgeStyle2(), new SelectedEdgeStyle3(), new SelectedEdgeStyle4()];
function BaseEdgeDrawer(context, drawObjects = null)
function BaseEdgeDrawer(context, drawObjects)
{
if (drawObjects === undefined)
{
drawObjects = null;
}
this.context = context;
this.drawObject = null;

View File

@ -86,8 +86,13 @@ EdgeModel.prototype.HitTest = function(position1, position2, mousePos)
}
EdgeModel.prototype.HitTestLine = function(position1, position2, mousePos, factor = 1.0)
EdgeModel.prototype.HitTestLine = function(position1, position2, mousePos, factor)
{
if (factor === undefined)
{
factor = 1.0;
}
var pos1 = position1;
var pos2 = position2;
var pos0 = mousePos;

View File

@ -825,8 +825,13 @@ SavedDialogGraphImageHandler.prototype.pathObjects = null;
// Objects.
SavedDialogGraphImageHandler.prototype.objects = null;
SavedDialogGraphImageHandler.prototype.show = function(object, isFull = false)
SavedDialogGraphImageHandler.prototype.show = function(object, isFull)
{
if (isFull === undefined)
{
isFull = false;
}
var showDialogCallback = function ()
{
var dialogButtons = {};

View File

@ -203,8 +203,13 @@ Graph.prototype.GetAdjacencyMatrix = function ()
return matrix;
}
Graph.prototype.TestAdjacencyMatrix = function (matrix, rowsObj, colsObj, separator = ",")
Graph.prototype.TestAdjacencyMatrix = function (matrix, rowsObj, colsObj, separator)
{
if(separator === undefined)
{
separator = ",";
}
var bGoodFormat = true;
rowsObj.rows = [];
rowsObj.rows = matrix.split ("\n");
@ -450,8 +455,13 @@ Graph.prototype.VertexesReposition = function (viewportSize, newVertexes)
}
}
Graph.prototype.SetAdjacencyMatrix = function (matrix, viewportSize, currentEnumVertesType, separator = ",")
Graph.prototype.SetAdjacencyMatrix = function (matrix, viewportSize, currentEnumVertesType, separator)
{
if (separator === undefined)
{
separator = ",";
}
var rowsObj = {};
var colsObj = {};
@ -512,8 +522,13 @@ Graph.prototype.SetAdjacencyMatrix = function (matrix, viewportSize, currentEnum
}
Graph.prototype.TestIncidenceMatrix = function (matrix, rowsObj, colsObj, separator = ",")
Graph.prototype.TestIncidenceMatrix = function (matrix, rowsObj, colsObj, separator)
{
if (separator === undefined)
{
separator = ",";
}
var bGoodFormat = true;
rowsObj.rows = [];
rowsObj.rows = matrix.split ("\n");
@ -691,8 +706,13 @@ Graph.prototype.GetIncidenceMatrix = function ()
return matrix;
}
Graph.prototype.SplitMatrixString = function (line, separator = ",")
Graph.prototype.SplitMatrixString = function (line, separator)
{
if (separator === undefined)
{
separator = ",";
}
var res = [];
var i = 0;