mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 10:27:12 +02:00
🐛 Try to remove cases when the thumbnail could be empty
This commit is contained in:
parent
1c54e9fa4d
commit
316b3d4539
2 changed files with 39 additions and 18 deletions
|
@ -264,12 +264,14 @@
|
|||
(defn append-child!
|
||||
[^js el child]
|
||||
(when (some? el)
|
||||
(.appendChild ^js el child)))
|
||||
(.appendChild ^js el child))
|
||||
el)
|
||||
|
||||
(defn remove-child!
|
||||
[^js el child]
|
||||
(when (some? el)
|
||||
(.removeChild ^js el child)))
|
||||
(.removeChild ^js el child))
|
||||
el)
|
||||
|
||||
(defn get-first-child
|
||||
[^js el]
|
||||
|
@ -639,3 +641,11 @@
|
|||
|
||||
{:ascent (.-fontBoundingBoxAscent measure)
|
||||
:descent (.-fontBoundingBoxDescent measure)}))
|
||||
|
||||
(defn clone-node
|
||||
[^js node]
|
||||
(.cloneNode node))
|
||||
|
||||
(defn has-children?
|
||||
[^js node]
|
||||
(> (-> node .-children .-length) 0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue