mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 16:18:11 -05:00
🐛 Fix problems with text editor selection
This commit is contained in:
parent
c3611c3047
commit
1ec423c11d
2 changed files with 15 additions and 6 deletions
|
@ -30,6 +30,7 @@
|
||||||
- Remove legacy system user and team [#843](https://github.com/penpot/penpot/issues/843)
|
- Remove legacy system user and team [#843](https://github.com/penpot/penpot/issues/843)
|
||||||
- Fix problem with zoom an selection rect [#845](https://github.com/penpot/penpot/issues/845)
|
- Fix problem with zoom an selection rect [#845](https://github.com/penpot/penpot/issues/845)
|
||||||
- Fix problem displaying team statistics [#859](https://github.com/penpot/penpot/issues/859)
|
- Fix problem displaying team statistics [#859](https://github.com/penpot/penpot/issues/859)
|
||||||
|
- Fix problems with text editor selection [Taiga #1546](https://tree.taiga.io/project/penpot/issue/1546)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
|
|
||||||
|
|
|
@ -163,10 +163,18 @@
|
||||||
::mf/wrap-props false
|
::mf/wrap-props false
|
||||||
::mf/forward-ref true}
|
::mf/forward-ref true}
|
||||||
[props ref]
|
[props ref]
|
||||||
(let [{:keys [id x y width height grow-type] :as shape} (obj/get props "shape")]
|
(let [{:keys [id x y width height grow-type] :as shape} (obj/get props "shape")
|
||||||
[:foreignObject {:transform (gsh/transform-matrix shape)
|
clip-id (str "clip-" id)]
|
||||||
:x x :y y
|
[:g.text-editor {:clip-path (str "url(#" clip-id ")")}
|
||||||
:width (if (#{:auto-width} grow-type) 100000 width)
|
[:defs
|
||||||
:height (if (#{:auto-height :auto-width} grow-type) 100000 height)}
|
;; This clippath will cut the huge foreign object we use to calculate the automatic resize
|
||||||
|
[:clipPath {:id clip-id}
|
||||||
|
[:rect {:x x :y y
|
||||||
|
:width (+ width 8) :height (+ height 8)
|
||||||
|
:transform (gsh/transform-matrix shape)}]]]
|
||||||
|
[:foreignObject {:transform (gsh/transform-matrix shape)
|
||||||
|
:x x :y y
|
||||||
|
:width (if (#{:auto-width} grow-type) 100000 width)
|
||||||
|
:height (if (#{:auto-height :auto-width} grow-type) 100000 height)}
|
||||||
|
|
||||||
[:& text-shape-edit-html {:shape shape :key (str id)}]]))
|
[:& text-shape-edit-html {:shape shape :key (str id)}]]]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue