From 66cec51c44b0b27e4479f295e83d0f780fda2500 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 16 Jun 2022 10:40:33 +0200 Subject: [PATCH 1/2] :bug: Fix text problem --- frontend/src/app/main/data/workspace/texts.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/texts.cljs b/frontend/src/app/main/data/workspace/texts.cljs index 956c41c59..30637d292 100644 --- a/frontend/src/app/main/data/workspace/texts.cljs +++ b/frontend/src/app/main/data/workspace/texts.cljs @@ -308,7 +308,7 @@ (assoc-in [:workspace-local :edition] (-> selected first :id))))))) (defn not-changed? [old-dim new-dim] - (> (mth/abs (- old-dim new-dim)) 0.1)) + (> (mth/abs (- old-dim new-dim)) 1)) (defn resize-text [id new-width new-height] From 24d23d9e5a1e39662f2bc6c1133fd69716ea934a Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 16 Jun 2022 18:50:01 +0200 Subject: [PATCH 2/2] :bug: Fix visual glitch with thumbnails --- .../src/app/main/ui/workspace/shapes/frame/node_store.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/shapes/frame/node_store.cljs b/frontend/src/app/main/ui/workspace/shapes/frame/node_store.cljs index 6d9730530..8eef40f24 100644 --- a/frontend/src/app/main/ui/workspace/shapes/frame/node_store.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/frame/node_store.cljs @@ -15,7 +15,7 @@ [thumbnail? node-ref rendered? render-frame?] (let [;; when `true` the node is in memory - in-memory? (mf/use-var true) + in-memory? (mf/use-state true) ;; State just for re-rendering re-render (mf/use-state 0) @@ -32,7 +32,7 @@ (reset! parent-ref node) (swap! re-render inc)))))] - (mf/use-effect + (mf/use-layout-effect (mf/deps thumbnail? render-frame?) (fn [] (when (and (some? @parent-ref) (some? @node-ref) @rendered? (and thumbnail? (not render-frame?)))