Closed sittingelk closed 1 year ago
ok, I think I just have to give the new container (may be the root/drawing) as parameter:
group.flatten (svg)
or svg.flatten (svg)
But documentation says "(default: parent container of the calling element)" so this nevertheless may be a bug (or a documentation incorrectness)?
flatten
is buggy in v3.0
and was fixed in the current master which isnt released yet. Can you try master and report if it solved your problem?
Quick guide how to use master:
git clone https://github.com/svgdotjs/svg.js
cd svg.js
npm install
npm run build
# files are in the ./dist folder now
thank you very much for quick answer!
I am sorry for my late one and more sorry, that I cannot report anything now, because I didnt had/have time to do so now, but will report as soon as possible.
Hi, the flatten method (https://svgjs.com/docs/3.0/manipulating/#flatten) on svg or group seems to be not working in SVG.js v3.0.
The reported error is: "TypeError: parent is undefined", "transform.js:41:13"
I use Firefox 77.0.1
Here is my minimal example:
Am I doing this wrong? Is this a bug?