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,6 +974,7 @@ export const getVisibleElements = (parentElement) => {
|
|||
}
|
||||
|
||||
const contentElems = []
|
||||
if (parentElement) {
|
||||
const children = parentElement.children
|
||||
// eslint-disable-next-line array-callback-return
|
||||
Array.from(children, (elem) => {
|
||||
|
@ -981,6 +982,7 @@ export const getVisibleElements = (parentElement) => {
|
|||
contentElems.push(elem)
|
||||
}
|
||||
})
|
||||
}
|
||||
return contentElems.reverse()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue