mirror of
https://github.com/penpot/penpot.git
synced 2025-04-16 08:51:32 -05:00
🐛 Fix SVG texts positioning inconsistencies
This commit is contained in:
parent
46c9fc1c5f
commit
06905d5fa6
2 changed files with 3 additions and 8 deletions
|
@ -8,6 +8,7 @@
|
|||
- Fix fill information not complete when paste plain text [Taiga #3680](https://tree.taiga.io/project/penpot/issue/3680)
|
||||
- Fix problem when resizing groups [Taiga #3702](https://tree.taiga.io/project/penpot/issue/3702)
|
||||
- Fix issues on typographies assets grouping [#2073](https://github.com/penpot/penpot/issues/2073)
|
||||
- Fix text positioning inconsistencies between browsers
|
||||
|
||||
## 1.14.1-beta
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
[app.common.geom.matrix :as gmt]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
[app.config :as cfg]
|
||||
[app.main.ui.context :as muc]
|
||||
[app.main.ui.shapes.attrs :as attrs]
|
||||
[app.main.ui.shapes.custom-stroke :refer [shape-custom-strokes]]
|
||||
|
@ -87,18 +86,13 @@
|
|||
|
||||
[:> :g group-props
|
||||
(for [[index data] (d/enumerate position-data)]
|
||||
(let [y (if (cfg/check-browser? :safari)
|
||||
(- (:y data) (:height data))
|
||||
(:y data))
|
||||
|
||||
alignment-bl (when (cfg/check-browser? :safari) "text-before-edge")
|
||||
dominant-bl (when-not (cfg/check-browser? :safari) "ideographic")
|
||||
(let [y (- (:y data) (:height data))
|
||||
dominant-bl "text-before-edge"
|
||||
rtl? (= "rtl" (:direction data))
|
||||
props (-> #js {:key (dm/str "text-" (:id shape) "-" index)
|
||||
:x (if rtl? (+ (:x data) (:width data)) (:x data))
|
||||
:y y
|
||||
:transform (position-data-transform shape data)
|
||||
:alignmentBaseline alignment-bl
|
||||
:dominantBaseline dominant-bl
|
||||
:style (-> #js {:fontFamily (:font-family data)
|
||||
:fontSize (:font-size data)
|
||||
|
|
Loading…
Add table
Reference in a new issue