mirror of
https://github.com/UnickSoft/graphonline.git
synced 2026-04-06 15:56:08 +00:00
Add settings for vertex shape and size.
This commit is contained in:
@@ -38,7 +38,8 @@ BaseVertex.prototype.SaveToXML = function ()
|
||||
"id=\"" + this.id + "\" " +
|
||||
"mainText=\"" + gEncodeToHTML(this.mainText) + "\" " +
|
||||
"upText=\"" + gEncodeToHTML(this.upText) + "\" " +
|
||||
((Object.keys(this.ownStyles).length > 0) ? "ownStyles = \"" + gEncodeToHTML(JSON.stringify(this.ownStyles)) + "\"": "") +
|
||||
((Object.keys(this.ownStyles).length > 0) ? "ownStyles = \"" + gEncodeToHTML(JSON.stringify(this.ownStyles)) + "\" ": "") +
|
||||
"size=\"" + this.model.diameter + "\" " +
|
||||
"></node>";
|
||||
}
|
||||
|
||||
@@ -78,6 +79,10 @@ BaseVertex.prototype.LoadFromXML = function (xml)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var size = xml.attr('size');
|
||||
if (typeof size !== 'undefined')
|
||||
this.model.diameter = parseInt(size);
|
||||
}
|
||||
|
||||
BaseVertex.prototype.SetId = function (id)
|
||||
|
||||
Reference in New Issue
Block a user