From 5192b366694ab50c69cd3217fd97be4a1a0ecf55 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 7 Nov 2022 12:00:54 +0100 Subject: [PATCH] :lipstick: Add some cosmetic adjustements --- frontend/src/app/main/data/workspace/thumbnails.cljs | 9 ++++----- frontend/src/app/main/ui/workspace/shapes/frame.cljs | 7 ++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/main/data/workspace/thumbnails.cljs b/frontend/src/app/main/data/workspace/thumbnails.cljs index 2c2a60f27..27cc69fb7 100644 --- a/frontend/src/app/main/data/workspace/thumbnails.cljs +++ b/frontend/src/app/main/data/workspace/thumbnails.cljs @@ -36,11 +36,10 @@ ;; 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))] (if (some? node) - (-> node - (.toBlob (fn [blob] - (rx/push! subs blob) - (rx/end! subs)) - "image/png")) + (.toBlob node (fn [blob] + (rx/push! subs blob) + (rx/end! subs)) + "image/png") ;; If we cannot find the node we send `nil` and the upsert will delete the thumbnail (do (rx/push! subs nil) diff --git a/frontend/src/app/main/ui/workspace/shapes/frame.cljs b/frontend/src/app/main/ui/workspace/shapes/frame.cljs index cbde0cc10..1de768035 100644 --- a/frontend/src/app/main/ui/workspace/shapes/frame.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/frame.cljs @@ -45,9 +45,10 @@ (defn check-props [new-props old-props] - (and - (= (unchecked-get new-props "thumbnail?") (unchecked-get old-props "thumbnail?")) - (= (unchecked-get new-props "shape") (unchecked-get old-props "shape")))) + (and (= (unchecked-get new-props "thumbnail?") + (unchecked-get old-props "thumbnail?")) + (= (unchecked-get new-props "shape") + (unchecked-get old-props "shape")))) (defn nested-frame-wrapper-factory [shape-wrapper]