0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 09:08:31 -05:00

🐛 Revert debugging text utilities

This commit is contained in:
alonso.torres 2022-03-16 17:52:38 +01:00
parent aec68c52ab
commit d2b5283489
3 changed files with 6 additions and 18 deletions

View file

@ -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"}

View file

@ -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)]]))]]))

View file

@ -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