Skip to content

Commit

Permalink
add viewport offset case .
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 committed Nov 2, 2020
1 parent e5da5a7 commit 7c8c7aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/frontend/ui.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
type "resize"
handler
(fn []
(let [vh (.-height viewport)
(let [vh (+ (.-offsetTop viewport) (.-height viewport))
rule (.. sheet -rules (item 0))
set-top #(set! (.. rule -style -top) (str % "px"))]
(set-top vh)
Expand Down

0 comments on commit 7c8c7aa

Please sign in to comment.