mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 15:18:23 +02:00
🎉 Add preserve scroll option
This commit is contained in:
parent
3d59d31b0a
commit
f913816d87
14 changed files with 94 additions and 12 deletions
|
@ -302,6 +302,21 @@
|
|||
(update [_ state]
|
||||
(assoc-in state [:viewer-local :interactions-show?] false))))
|
||||
|
||||
(defn set-nav-scroll
|
||||
[scroll]
|
||||
(ptk/reify ::set-nav-scroll
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(assoc-in state [:viewer-local :nav-scroll] scroll))))
|
||||
|
||||
(defn reset-nav-scroll
|
||||
[]
|
||||
(ptk/reify ::reset-nav-scroll
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(d/dissoc-in state [:viewer-local :nav-scroll]))))
|
||||
|
||||
|
||||
;; --- Navigation inside page
|
||||
|
||||
(defn go-to-frame-by-index
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue