mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 12:48:33 +02:00
🐛 Fix several transitions on same frame
This commit is contained in:
parent
7599b7abc6
commit
7618fcade0
3 changed files with 68 additions and 56 deletions
|
@ -277,7 +277,7 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(dissoc :viewer-animation)
|
||||
(dissoc :viewer-animations)
|
||||
(assoc :viewer-overlays [])))
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
@ -295,7 +295,7 @@
|
|||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(-> state
|
||||
(dissoc :viewer-animation)
|
||||
(dissoc :viewer-animations)
|
||||
(assoc :viewer-overlays [])))
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
|
@ -381,7 +381,7 @@
|
|||
(ptk/reify ::complete-animation
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(dissoc state :viewer-animation))))
|
||||
(dissoc state :viewer-animations))))
|
||||
|
||||
;; --- Navigation inside page
|
||||
|
||||
|
@ -422,7 +422,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}))))
|
||||
|
@ -475,13 +475,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]
|
||||
|
@ -489,10 +490,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