Adjusted requested code styling changes.
This commit is contained in:
@@ -190,7 +190,7 @@ var selectedElements = [];
|
|||||||
//
|
//
|
||||||
// Returns: The new element
|
// Returns: The new element
|
||||||
var addSvgElementFromJson = this.addSvgElementFromJson = function(data) {
|
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);
|
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
|
// 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);
|
svgedit.utilities.cleanupElement(shape);
|
||||||
|
|
||||||
// Children
|
// Children
|
||||||
if(data.children) {
|
if (data.children) {
|
||||||
data.children.forEach(function(child) {
|
data.children.forEach(function(child) {
|
||||||
shape.appendChild(addSvgElementFromJson(child));
|
shape.appendChild(addSvgElementFromJson(child));
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user