mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-13 19:26:21 +00:00
Fix bug with rename vertex. Add postfix for graph with styles.
This commit is contained in:
@@ -937,7 +937,7 @@ Application.prototype.SaveGraphOnDisk = function ()
|
||||
|
||||
Application.prototype.SaveGraphImageOnDisk = function (showDialogCallback)
|
||||
{
|
||||
var imageName = this.GetNewGraphName();
|
||||
var imageName = this.GetNewName();
|
||||
|
||||
this.stopRenderTimer();
|
||||
this.redrawGraph();
|
||||
@@ -978,7 +978,7 @@ Application.prototype.SaveGraphImageOnDisk = function (showDialogCallback)
|
||||
|
||||
Application.prototype.SaveFullGraphImageOnDisk = function (showDialogCallback, forPrint)
|
||||
{
|
||||
var imageName = this.GetNewGraphName();
|
||||
var imageName = this.GetNewName();
|
||||
|
||||
this.stopRenderTimer();
|
||||
var canvas = forPrint ? this._PrintRedrawGraph() : this._OffscreenRedrawGraph();
|
||||
@@ -1038,6 +1038,19 @@ Application.prototype.LoadGraphFromDisk = function (graphName)
|
||||
|
||||
|
||||
Application.prototype.GetNewGraphName = function()
|
||||
{
|
||||
var name = this.GetNewName();
|
||||
|
||||
if (this.isVertexCommonStyleCustom || this.isVertexSelectedVertexStylesCustom ||
|
||||
this.isBackgroundCommonStyleCustom || this.isEdgeCommonStyleCustom || this.isEdgeSelectedStylesCustom)
|
||||
{
|
||||
name = name + "ZZcst";
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
Application.prototype.GetNewName = function()
|
||||
{
|
||||
var name = "";
|
||||
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
Reference in New Issue
Block a user