From d2b528348923ed7a6238269ac30f5602864dfe00 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Wed, 16 Mar 2022 17:52:38 +0100 Subject: [PATCH] :bug: Revert debugging text utilities --- frontend/src/app/main/ui/shapes/text/styles.cljs | 6 +++--- .../src/app/main/ui/shapes/text/svg_text.cljs | 16 ++-------------- .../src/app/main/ui/workspace/shapes/text.cljs | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index fc6a60c25e..db1f75013a 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -71,8 +71,8 @@ font-variant-id (:font-variant-id data) font-size (:font-size data) - fill-color (:fill-color data) - fill-opacity (:fill-opacity data) + fill-color (or (-> data :fills first :fill-color) (:fill-color data)) + fill-opacity (or (-> data :fills first :fill-opacity) (:fill-opacity data)) [r g b a] (uc/hex->rgba fill-color fill-opacity) text-color (when (and (some? fill-color) (some? fill-opacity)) @@ -83,7 +83,7 @@ base #js {:textDecoration text-decoration :textTransform text-transform :lineHeight (or line-height "inherit") - :color (if show-text? text-color "red") + :color (if show-text? text-color "transparent") :caretColor (or text-color "black") :overflowWrap "initial"} diff --git a/frontend/src/app/main/ui/shapes/text/svg_text.cljs b/frontend/src/app/main/ui/shapes/text/svg_text.cljs index cbed80c747..75648bbfeb 100644 --- a/frontend/src/app/main/ui/shapes/text/svg_text.cljs +++ b/frontend/src/app/main/ui/shapes/text/svg_text.cljs @@ -64,17 +64,5 @@ (obj/set! "fill" (str "url(#fill-" index "-" render-id ")")))}) shape (assoc shape :fills (:fills data))] - [:* - #_[:rect {:x (:x data) - :y (- (:y data) (:height data)) - :width (:width data) - :height (:height data) - :style {:fill "none" :stroke-width 1 :stroke "red"}}] - [:line {:x1 (mth/round (:x data)) - :y1 (mth/round (:y data)) - :x2 (mth/round (+ (:x data) (:width data))) - :y2 (mth/round (:y data)) - :style {:fill "none" :stroke-width 0.5 :stroke "blue"}}] - - [:& shape-custom-strokes {:shape shape} - [:> :text props (:text data)]]]))]])) + [:& shape-custom-strokes {:shape shape} + [:> :text props (:text data)]]))]])) diff --git a/frontend/src/app/main/ui/workspace/shapes/text.cljs b/frontend/src/app/main/ui/workspace/shapes/text.cljs index 1798a24eeb..18bf8fc093 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text.cljs @@ -209,7 +209,7 @@ ;; and updates the selrect accordingly [:* [:g.text-shape {:ref on-change-node - :opacity (when show-svg-text? 0.2) + :opacity (when show-svg-text? 0) :pointer-events "none"} ;; The `:key` prop here is mandatory because the