Skip to content

Commit

Permalink
fix: get animated-header component to work
Browse files Browse the repository at this point in the history
  • Loading branch information
siddarthkay committed Sep 9, 2023
1 parent 64731fa commit 61bfc81
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
37 changes: 19 additions & 18 deletions src/quo/components/animated_header.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
; animation-value
; {:duration 250
; :easing (:ease-in animated/easings)})
; on-scroll (animated/on-scroll {:y y})
; on-scroll (animated/on-scroll {:y y})
layout (reagent/atom {})
offset (reagent/atom 0)
on-layout (fn [evt]
Expand Down Expand Up @@ -68,23 +68,24 @@
:offset @offset}]]
:title-align :left}
(dissoc props :extended-header))]]
; (into [animated/scroll-view
; {:on-scroll on-scroll
; :refreshControl (when refresh-control
; (refresh-control
; (and @refreshing-sub
; @refreshing-counter)))
; :style {:z-index 1}
; :scrollEventThrottle 16}
; [animated/view {:pointer-events :box-none}
; [animated/view
; {:pointer-events :box-none
; :on-layout on-layout}
; [extended-header
; {:value y
;; :animation animation
; :offset @offset}]]]]
; children)
(into [animated/scroll-view
{
; :on-scroll on-scroll
:refreshControl (when refresh-control
(refresh-control
(and @refreshing-sub
@refreshing-counter)))
:style {:z-index 1}
:scrollEventThrottle 16}
[animated/view {:pointer-events :box-none}
[animated/view
{:pointer-events :box-none
:on-layout on-layout}
[extended-header
{:value y
; :animation animation
:offset @offset}]]]]
children)
])))

(defn header
Expand Down
4 changes: 2 additions & 2 deletions src/quo/components/controls/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
; value
onChange disabled]}
(bean/bean props)
state (animated/use-value 0)
tap-state (animated/use-value (:undetermined gh/states))
state 0
tap-state (:undetermined gh/states)
tap-handler (animated/on-gesture {:state tap-state})
hold (react/use-memo
(fn []
Expand Down

0 comments on commit 61bfc81

Please sign in to comment.