Fix fit to content (#841)
* Fix: avoid to select defs or title as parentElement * Fix: fix problem when nothing is drawingmaster
parent
aabd593123
commit
cb2fe733dd
|
@ -974,13 +974,15 @@ export const getVisibleElements = (parentElement) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const contentElems = []
|
const contentElems = []
|
||||||
const children = parentElement.children
|
if (parentElement) {
|
||||||
// eslint-disable-next-line array-callback-return
|
const children = parentElement.children
|
||||||
Array.from(children, (elem) => {
|
// eslint-disable-next-line array-callback-return
|
||||||
if (elem.getBBox) {
|
Array.from(children, (elem) => {
|
||||||
contentElems.push(elem)
|
if (elem.getBBox) {
|
||||||
}
|
contentElems.push(elem)
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
return contentElems.reverse()
|
return contentElems.reverse()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue