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/modules/optional | |
parent | b30f0d691dfec74bc855e5550970d0fb35931881 (diff) | |
download | svg.js-8fa0873a632f828ed1ad85aa30dee97bc585d32f.tar.gz svg.js-8fa0873a632f828ed1ad85aa30dee97bc585d32f.zip |
skip descriptive elements on rebuild and toParent
Diffstat (limited to 'src/modules/optional')
-rw-r--r-- | src/modules/optional/transform.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/optional/transform.js b/src/modules/optional/transform.js index 7f950b3..b8ba46a 100644 --- a/src/modules/optional/transform.js +++ b/src/modules/optional/transform.js @@ -1,4 +1,4 @@ -import { getOrigin } from '../../utils/utils.js' +import { getOrigin, isDescriptive } from '../../utils/utils.js' import { delimiter, transforms } from '../core/regex.js' import { registerMethods } from '../../utils/methods.js' import Matrix from '../../types/Matrix.js' @@ -39,6 +39,9 @@ export function matrixify() { // add an element to another parent without changing the visual representation on the screen export function toParent(parent, i) { if (this === parent) return this + + if (isDescriptive(this.node)) return this.addTo(parent, i) + const ctm = this.screenCTM() const pCtm = parent.screenCTM().inverse() |