diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2023-09-02 21:23:53 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2023-09-02 21:23:53 +0200 |
commit | 8fa0873a632f828ed1ad85aa30dee97bc585d32f (patch) | |
tree | adf24490470a8863ca86dafb7d127c4e63148837 /src/utils | |
parent | b30f0d691dfec74bc855e5550970d0fb35931881 (diff) | |
download | svg.js-8fa0873a632f828ed1ad85aa30dee97bc585d32f.tar.gz svg.js-8fa0873a632f828ed1ad85aa30dee97bc585d32f.zip |
skip descriptive elements on rebuild and toParent
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/utils.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/utils.js b/src/utils/utils.js index c6e6d3b..0d297ec 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -120,3 +120,7 @@ export function getOrigin(o, element) { // Return the origin as it is if it wasn't a string return [ox, oy] } + +const descriptiveElements = new Set(['desc', 'metadata', 'title']) +export const isDescriptive = (element) => + descriptiveElements.has(element.nodeName) |