mirror of
https://github.com/UnickSoft/graphonline.git
synced 2025-07-03 16:25:59 +00:00
Fix bug with rename vertex. Add postfix for graph with styles.
This commit is contained in:
parent
1abf19abbf
commit
c580c5aef9
@ -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";
|
||||
|
@ -203,8 +203,6 @@ function DefaultHandler(app)
|
||||
{
|
||||
BaseHandler.apply(this, arguments);
|
||||
this.message = g_textsSelectAndMove;
|
||||
|
||||
this.bindedRename = false;
|
||||
}
|
||||
|
||||
// inheritance.
|
||||
@ -276,8 +274,6 @@ DefaultHandler.prototype.MouseUp = function(pos)
|
||||
this.message = g_textsSelectAndMove + " <button type=\"button\" id=\"renameButton\" class=\"btn btn-default btn-xs\" style=\"float:right;z-index:1;position: relative;\">" + g_renameVertex + "</button>";
|
||||
|
||||
var handler = this;
|
||||
if (!this.bindedRename)
|
||||
{
|
||||
var callback = function (enumType) {
|
||||
handler.RenameVertex(enumType.GetVertexText(0));
|
||||
userAction("RenameVertex");
|
||||
@ -287,8 +283,6 @@ DefaultHandler.prototype.MouseUp = function(pos)
|
||||
var customEnum = new TextEnumVertexsCustom();
|
||||
customEnum.ShowDialog(callback, g_rename, g_renameVertex, handler.selectedObject.mainText);
|
||||
});
|
||||
this.bindedRename = true;
|
||||
}
|
||||
}
|
||||
else if (this.selectedObject != null && (this.selectedObject instanceof BaseEdge))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user