From 734287b66d41317a4b36c8d7e08f34c79df7f1ef Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 7 Oct 2021 10:30:49 +0200 Subject: [PATCH] :bug: Fix stroke caps adjustments in relation with stroke size --- CHANGES.md | 5 +++++ .../src/app/main/ui/shapes/custom_stroke.cljs | 22 +++++++++---------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 87539d718..0156f395d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -24,9 +24,14 @@ - Fix group renaming problem [Taiga #1969](https://tree.taiga.io/project/penpot/issue/1969) - Fix export group with shadows on children [Taiga #2036](https://tree.taiga.io/project/penpot/issue/2036) - Fix zoom context menu in viewer [Taiga #2041](https://tree.taiga.io/project/penpot/issue/2041) +- Fix stroke caps adjustments in relation with stroke size [Taiga #2123](https://tree.taiga.io/project/penpot/issue/2123) ### :arrow_up: Deps updates ### :boom: Breaking changes + +- Some stroke-caps can change behaviour +- Text display bug fix could potentialy make some texts jump a line + ### :heart: Community contributions by (Thank you!) ## 1.8.3-alpha diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index 6a5f92dcb..1ce51046d 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -60,8 +60,8 @@ :viewBox "0 0 3 6" :refX "2" :refY "3" - :markerWidth "3" - :markerHeight "6" + :markerWidth "8.5" + :markerHeight "8.5" :orient "auto-start-reverse" :fill stroke-color :fillOpacity stroke-opacity} @@ -72,8 +72,8 @@ :viewBox "0 0 3 6" :refX "2" :refY "3" - :markerWidth "3" - :markerHeight "6" + :markerWidth "8.5" + :markerHeight "8.5" :orient "auto-start-reverse" :fill stroke-color :fillOpacity stroke-opacity} @@ -82,10 +82,10 @@ (when (or (= cap-start :square-marker) (= cap-end :square-marker)) [:marker {:id (str marker-id-prefix "-square-marker") :viewBox "0 0 6 6" - :refX "5" + :refX "3" :refY "3" - :markerWidth "6" - :markerHeight "6" + :markerWidth "4.2426" ;; diagonal length of a 3x3 square + :markerHeight "4.2426" :orient "auto-start-reverse" :fill stroke-color :fillOpacity stroke-opacity} @@ -94,10 +94,10 @@ (when (or (= cap-start :circle-marker) (= cap-end :circle-marker)) [:marker {:id (str marker-id-prefix "-circle-marker") :viewBox "0 0 6 6" - :refX "5" + :refX "3" :refY "3" - :markerWidth "6" - :markerHeight "6" + :markerWidth "4" + :markerHeight "4" :orient "auto-start-reverse" :fill stroke-color :fillOpacity stroke-opacity} @@ -106,7 +106,7 @@ (when (or (= cap-start :diamond-marker) (= cap-end :diamond-marker)) [:marker {:id (str marker-id-prefix "-diamond-marker") :viewBox "0 0 6 6" - :refX "5" + :refX "3" :refY "3" :markerWidth "6" :markerHeight "6"