Added ability to create a text node with just a string in addSvgElementFromJson().
parent
b301acf716
commit
e79db0f2a6
|
@ -189,6 +189,8 @@ var selectedElements = [];
|
|||
//
|
||||
// Returns: The new element
|
||||
var addSvgElementFromJson = this.addSvgElementFromJson = function addSvgElementFromJson(data) {
|
||||
if(typeof(data) == 'string') return svgdoc.createTextNode(data);
|
||||
|
||||
var shape = svgedit.utilities.getElem(data.attr.id);
|
||||
// if shape is a path but we need to create a rect/ellipse, then remove the path
|
||||
var current_layer = getCurrentDrawing().getCurrentLayer();
|
||||
|
|
Loading…
Reference in New Issue