Procházet zdrojové kódy

Fix throwing when call svg.ungroup()

Current status: `svg.ungroup()` throws with confusing message "Uncaught TypeError: parent.screenCTM is not a function".
Fix: Early throws with determine message.
pull/1234/head
OpenGG před 2 roky
rodič
revize
07332b302d
Žádný účet není propojen s e-mailovou adresou tvůrce revize
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3
    0
      src/elements/Container.js

+ 3
- 0
src/elements/Container.js Zobrazit soubor

@@ -13,6 +13,9 @@ export default class Container extends Element {
}

ungroup (parent = this.parent(), index = parent.index(this)) {
if (this.isRoot()) {
throw new Error('Can not ungroup svg root element')
}
// when parent != this, we want append all elements to the end
index = index === -1 ? parent.children().length : index


Načítá se…
Zrušit
Uložit