update
parent
95c922f7ea
commit
4814b9c398
16
src/svg.js
16
src/svg.js
|
@ -1275,16 +1275,14 @@ export class SnapElement {
|
||||||
return Array.from(this.node.childNodes).map(n => new Snap(n))
|
return Array.from(this.node.childNodes).map(n => new Snap(n))
|
||||||
}
|
}
|
||||||
|
|
||||||
/*\
|
/**
|
||||||
**
|
|
||||||
* Returns object representation of the given element and all its children.
|
* Returns object representation of the given element and all its children.
|
||||||
= (object) in format
|
{
|
||||||
o {
|
type (string) this.type,
|
||||||
o type (string) this.type,
|
attr (object) attributes map,
|
||||||
o attr (object) attributes map,
|
childNodes (array) optional array of children in the same format
|
||||||
o childNodes (array) optional array of children in the same format
|
}
|
||||||
o }
|
*/
|
||||||
\*/
|
|
||||||
toJSON() {
|
toJSON() {
|
||||||
let out = []
|
let out = []
|
||||||
jsonFiller([this], out)
|
jsonFiller([this], out)
|
||||||
|
|
Loading…
Reference in New Issue