Adjusted requested code styling changes.
parent
c65f98b0ba
commit
b92024eca2
|
@ -190,7 +190,7 @@ var selectedElements = [];
|
|||
//
|
||||
// Returns: The new element
|
||||
var addSvgElementFromJson = this.addSvgElementFromJson = function(data) {
|
||||
if(typeof(data) == 'string') return svgdoc.createTextNode(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
|
||||
|
@ -223,7 +223,7 @@ var addSvgElementFromJson = this.addSvgElementFromJson = function(data) {
|
|||
svgedit.utilities.cleanupElement(shape);
|
||||
|
||||
// Children
|
||||
if(data.children) {
|
||||
if (data.children) {
|
||||
data.children.forEach(function(child) {
|
||||
shape.appendChild(addSvgElementFromJson(child));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue