mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 14:18:24 +02:00
Merge branch 'staging' into develop
This commit is contained in:
commit
4af851d4c6
15 changed files with 230 additions and 195 deletions
|
@ -304,6 +304,11 @@
|
|||
|
||||
(def select-prev-frame
|
||||
(ptk/reify ::select-prev-frame
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(dissoc :viewer-animations)
|
||||
(assoc :viewer-overlays [])))
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [route (:route state)
|
||||
|
@ -317,6 +322,11 @@
|
|||
|
||||
(def select-next-frame
|
||||
(ptk/reify ::select-next-frame
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(dissoc :viewer-animations)
|
||||
(assoc :viewer-overlays [])))
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [route (:route state)
|
||||
|
@ -400,7 +410,7 @@
|
|||
(ptk/reify ::complete-animation
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(dissoc state :viewer-animation))))
|
||||
(dissoc state :viewer-animations))))
|
||||
|
||||
;; --- Navigation inside page
|
||||
|
||||
|
@ -441,7 +451,7 @@
|
|||
(assoc :viewer-overlays [])
|
||||
|
||||
(some? animation)
|
||||
(assoc :viewer-animation
|
||||
(assoc-in [:viewer-animations (:id frame)]
|
||||
{:kind :go-to-frame
|
||||
:orig-frame-id (:id frame)
|
||||
:animation animation}))))
|
||||
|
@ -494,13 +504,14 @@
|
|||
:id (:id frame)
|
||||
:position position
|
||||
:close-click-outside close-click-outside
|
||||
:background-overlay background-overlay})
|
||||
:background-overlay background-overlay
|
||||
:animation animation})
|
||||
|
||||
(some? animation)
|
||||
(assoc :viewer-animation
|
||||
{:kind :open-overlay
|
||||
:overlay-id (:id frame)
|
||||
:animation animation})))
|
||||
(assoc-in [:viewer-animations (:id frame)]
|
||||
{:kind :open-overlay
|
||||
:overlay-id (:id frame)
|
||||
:animation animation})))
|
||||
|
||||
(defn- close-overlay*
|
||||
[state frame-id animation]
|
||||
|
@ -508,10 +519,10 @@
|
|||
(update state :viewer-overlays
|
||||
(fn [overlays]
|
||||
(d/removev #(= (:id (:frame %)) frame-id) overlays)))
|
||||
(assoc state :viewer-animation
|
||||
{:kind :close-overlay
|
||||
:overlay-id frame-id
|
||||
:animation animation})))
|
||||
(assoc-in state [:viewer-animations frame-id]
|
||||
{:kind :close-overlay
|
||||
:overlay-id frame-id
|
||||
:animation animation})))
|
||||
|
||||
(defn open-overlay
|
||||
[frame-id position close-click-outside background-overlay animation]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue