From 7c21624e09dace102b91c73a0e61b817dc6d3f10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Fri, 26 Mar 2021 14:22:33 +0100 Subject: [PATCH] :bug: Fix glitch when dragging a file thumbnail in the dashboard --- frontend/src/app/main/ui/shapes/text.cljs | 3 ++- frontend/src/app/main/ui/workspace/shapes/text.cljs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/text.cljs b/frontend/src/app/main/ui/shapes/text.cljs index a5f2d6962..0972757b6 100644 --- a/frontend/src/app/main/ui/shapes/text.cljs +++ b/frontend/src/app/main/ui/shapes/text.cljs @@ -95,7 +95,8 @@ {::mf/wrap-props false ::mf/forward-ref true} [props ref] - (let [{:keys [id x y width height content grow-type] :as shape} (obj/get props "shape") + (let [{:keys [id x y width height content] :as shape} (obj/get props "shape") + grow-type (obj/get props "grow-type") ;; This is only needed in workspace embed-fonts? (mf/use-ctx muc/embed-ctx) ;; We add 8px to add a padding for the exporter ;; width (+ width 8) diff --git a/frontend/src/app/main/ui/workspace/shapes/text.cljs b/frontend/src/app/main/ui/workspace/shapes/text.cljs index 34603235b..91a70165e 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text.cljs @@ -101,7 +101,7 @@ (.observe observer paragraph-node) #(.disconnect observer))))) - [:& text/text-shape {:ref text-ref-cb :shape shape}])) + [:& text/text-shape {:ref text-ref-cb :shape shape :grow-type (:grow-type shape)}])) (mf/defc text-wrapper {::mf/wrap-props false}