mirror of
https://github.com/penpot/penpot.git
synced 2025-08-03 14:38:21 +02:00
Merge branch 'develop' into token-studio-develop
This commit is contained in:
commit
6af6dd1288
489 changed files with 80267 additions and 46712 deletions
|
@ -46,7 +46,6 @@
|
|||
page' (cthf/current-page file')
|
||||
|
||||
guide' (-> page'
|
||||
:options
|
||||
:guides
|
||||
(vals)
|
||||
(first))]
|
||||
|
|
|
@ -223,22 +223,22 @@
|
|||
(t/is (= (-> (. shape -strokes) (aget 0) (aget "strokeWidth")) 5))))
|
||||
|
||||
(t/testing "Relative properties"
|
||||
(let [frame (.createFrame context)]
|
||||
(set! (.-x frame) 100)
|
||||
(set! (.-y frame) 200)
|
||||
(t/is (= (.-x frame) 100))
|
||||
(t/is (= (.-y frame) 200))
|
||||
(.appendChild frame shape)
|
||||
(let [board (.createBoard context)]
|
||||
(set! (.-x board) 100)
|
||||
(set! (.-y board) 200)
|
||||
(t/is (= (.-x board) 100))
|
||||
(t/is (= (.-y board) 200))
|
||||
(.appendChild board shape)
|
||||
|
||||
(t/testing " - frameX"
|
||||
(set! (.-frameX shape) 10)
|
||||
(t/is (m/close? (.-frameX shape) 10))
|
||||
(t/testing " - boardX"
|
||||
(set! (.-boardX shape) 10)
|
||||
(t/is (m/close? (.-boardX shape) 10))
|
||||
(t/is (m/close? (.-x shape) 110))
|
||||
(t/is (m/close? (get-in @store (get-shape-path :x)) 110)))
|
||||
|
||||
(t/testing " - frameY"
|
||||
(set! (.-frameY shape) 20)
|
||||
(t/is (m/close? (.-frameY shape) 20))
|
||||
(t/testing " - boardY"
|
||||
(set! (.-boardY shape) 20)
|
||||
(t/is (m/close? (.-boardY shape) 20))
|
||||
(t/is (m/close? (.-y shape) 220))
|
||||
(t/is (m/close? (get-in @store (get-shape-path :y)) 220)))
|
||||
|
||||
|
|
|
@ -391,9 +391,9 @@
|
|||
|
||||
(t/testing "Update global guide"
|
||||
(let [guide {:position 50 :axis :x}
|
||||
file (-> (fb/create-file "Test")
|
||||
(fb/add-page {:name "Page 1"})
|
||||
(fb/add-guide guide))
|
||||
file (-> (fb/create-file "Test")
|
||||
(fb/add-page {:name "Page 1"})
|
||||
(fb/add-guide guide))
|
||||
|
||||
guide-id (:last-id file)
|
||||
guide (assoc guide :id guide-id)
|
||||
|
@ -403,7 +403,7 @@
|
|||
|
||||
frame-id (:last-id file)
|
||||
page (fb/get-current-page file)
|
||||
data (-> (sd/make-snap-data) (sd/add-page page))
|
||||
data (-> (sd/make-snap-data) (sd/add-page page))
|
||||
|
||||
new-page (-> (fb/update-guide file (assoc guide :position 150))
|
||||
(fb/get-current-page))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue