🎉 Add preserve scroll option

This commit is contained in:
Andrés Moya 2021-11-02 15:19:11 +01:00
parent 3d59d31b0a
commit f913816d87
14 changed files with 94 additions and 12 deletions

View file

@ -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