mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 06:58:29 +02:00
🐛 Fix strokes don't update correctly
This commit is contained in:
parent
3af44641de
commit
642b6b1621
6 changed files with 95 additions and 65 deletions
|
@ -48,7 +48,7 @@
|
|||
(t/is (= (:fill-color fill') "#fabada"))
|
||||
(t/is (= (:fill-opacity fill') 1))))))))
|
||||
|
||||
(t/deftest test-update-stroke
|
||||
(t/deftest test-update-stroke-color
|
||||
;; Old shapes without stroke-alignment are rendered as if it is centered
|
||||
(t/async
|
||||
done
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
;; ==== Action
|
||||
events
|
||||
[(dc/change-stroke #{(cthi/id :shape1)} {:color "#FABADA"} 0)]]
|
||||
[(dc/change-stroke-color #{(cthi/id :shape1)} {:color "#FABADA"} 0)]]
|
||||
|
||||
(ths/run-store
|
||||
store done events
|
||||
|
@ -77,6 +77,8 @@
|
|||
first)]
|
||||
|
||||
;; ==== Check
|
||||
(println stroke')
|
||||
;; (println stroke')
|
||||
(t/is (some? shape1'))
|
||||
(t/is (= (:stroke-alignment stroke') :inner))))))))
|
||||
(t/is (= (:stroke-alignment stroke') :inner))
|
||||
(t/is (= (:stroke-color stroke') "#FABADA"))
|
||||
(t/is (= (:stroke-width stroke') 2))))))))
|
||||
|
|
|
@ -23,11 +23,9 @@
|
|||
|
||||
_ (set! st/state store)
|
||||
|
||||
context (api/create-context "TEST")
|
||||
|
||||
page (. context -currentPage)
|
||||
|
||||
shape (.createRectangle context)
|
||||
^js context (api/create-context "TEST")
|
||||
^js page (. context -currentPage)
|
||||
^js shape (.createRectangle context)
|
||||
|
||||
get-shape-path
|
||||
#(vector :workspace-data :pages-index (aget page "$id") :objects (aget shape "$id") %)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue