Added export/import graph

This commit is contained in:
Unick Soft
2018-06-17 18:44:19 +03:00
parent 0149bcc1f7
commit cb3fbf03de
5 changed files with 73 additions and 7 deletions

View File

@@ -857,6 +857,17 @@ Application.prototype.SaveFullGraphImageOnDisk = function (showDialogCallback)
Application.prototype.LoadGraphFromString = function (str)
{
var graph = new Graph();
graph.LoadFromXML(str);
this.SetDefaultTransformations();
this.graph = graph;
this.AutoAdjustViewport();
this.updateMessage();
this.redrawGraph();
}
Application.prototype.LoadGraphFromDisk = function (graphName)
{
var app = this;
@@ -867,13 +878,7 @@ Application.prototype.LoadGraphFromDisk = function (graphName)
})
.done(function( msg )
{
var graph = new Graph();
graph.LoadFromXML(msg);
app.SetDefaultTransformations();
app.graph = graph;
app.AutoAdjustViewport();
app.updateMessage();
app.redrawGraph();
app.LoadGraphFromString(msg);
});
}