💄 Add some cosmetic adjustements

This commit is contained in:
Andrey Antukh 2022-11-07 12:00:54 +01:00 committed by Andrés Moya
parent b20d2badfe
commit 5192b36669
2 changed files with 8 additions and 8 deletions

View file

@ -36,11 +36,10 @@
;; will be empty on first rendering before drawing the thumbnail and we don't want to store that ;; will be empty on first rendering before drawing the thumbnail and we don't want to store that
(let [node (dom/query (dm/fmt "canvas.thumbnail-canvas[data-object-id='%'][data-empty='false']" object-id))] (let [node (dom/query (dm/fmt "canvas.thumbnail-canvas[data-object-id='%'][data-empty='false']" object-id))]
(if (some? node) (if (some? node)
(-> node (.toBlob node (fn [blob]
(.toBlob (fn [blob]
(rx/push! subs blob) (rx/push! subs blob)
(rx/end! subs)) (rx/end! subs))
"image/png")) "image/png")
;; If we cannot find the node we send `nil` and the upsert will delete the thumbnail ;; If we cannot find the node we send `nil` and the upsert will delete the thumbnail
(do (rx/push! subs nil) (do (rx/push! subs nil)

View file

@ -45,9 +45,10 @@
(defn check-props (defn check-props
[new-props old-props] [new-props old-props]
(and (and (= (unchecked-get new-props "thumbnail?")
(= (unchecked-get new-props "thumbnail?") (unchecked-get old-props "thumbnail?")) (unchecked-get old-props "thumbnail?"))
(= (unchecked-get new-props "shape") (unchecked-get old-props "shape")))) (= (unchecked-get new-props "shape")
(unchecked-get old-props "shape"))))
(defn nested-frame-wrapper-factory (defn nested-frame-wrapper-factory
[shape-wrapper] [shape-wrapper]