0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-25 07:58:49 -05:00

🐛 Fixes problems with handoff and text shapes

This commit is contained in:
alonso.torres 2020-12-23 10:44:04 +01:00
parent 33b6df01ba
commit 9ae9da8256
2 changed files with 7 additions and 6 deletions

View file

@ -88,7 +88,7 @@
[props ref]
(let [shape (unchecked-get props "shape")
selected? (unchecked-get props "selected?")
grow-type (:grow-type shape)
grow-type (unchecked-get props "grow-type")
{:keys [id x y width height content]} shape]
[:foreignObject {:x x
:y y
@ -97,7 +97,6 @@
:transform (geom/transform-matrix shape)
:width (if (#{:auto-width} grow-type) 10000 width)
:height (if (#{:auto-height :auto-width} grow-type) 10000 height)
:ref ref
:pointer-events "none"}
:ref ref}
[:& text-content {:shape shape
:content (:content shape)}]]))

View file

@ -110,10 +110,12 @@
[:& text/text-shape {:key (str "text-shape" (:id shape))
:ref text-ref-cb
:shape shape
:selected? selected?}]]
:selected? selected?
:grow-type (:grow-type shape)}]]
(when edition?
[:& editor/text-shape-edit {:key (str "editor" (:id shape))
:shape shape}])
[:g {:pointer-events "none"}
[:& editor/text-shape-edit {:key (str "editor" (:id shape))
:shape shape}]])
(when-not edition?
[:rect.text-actions