From 4814b9c3984e19ed38db05f3aa362997efb0de49 Mon Sep 17 00:00:00 2001 From: yutent Date: Thu, 14 Mar 2024 18:42:13 +0800 Subject: [PATCH] update --- src/svg.js | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/svg.js b/src/svg.js index 054338d..bc41412 100644 --- a/src/svg.js +++ b/src/svg.js @@ -1275,16 +1275,14 @@ export class SnapElement { return Array.from(this.node.childNodes).map(n => new Snap(n)) } - /*\ - ** - * Returns object representation of the given element and all its children. - = (object) in format - o { - o type (string) this.type, - o attr (object) attributes map, - o childNodes (array) optional array of children in the same format - o } -\*/ + /** + * Returns object representation of the given element and all its children. + { + type (string) this.type, + attr (object) attributes map, + childNodes (array) optional array of children in the same format + } + */ toJSON() { let out = [] jsonFiller([this], out)