This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-23
Channels
- # admin-announcements (6)
- # aleph (3)
- # beginners (38)
- # boot (119)
- # braid-chat (15)
- # braveandtrue (1)
- # clara (4)
- # cljs-dev (56)
- # cljsfiddle (12)
- # cljsjs (15)
- # cljsrn (6)
- # clojars (4)
- # clojure (113)
- # clojure-art (1)
- # clojure-berlin (1)
- # clojure-dusseldorf (3)
- # clojure-india (15)
- # clojure-new-zealand (3)
- # clojure-poland (1)
- # clojure-russia (83)
- # clojure-uk (18)
- # clojurescript (97)
- # community-development (9)
- # cursive (1)
- # data-science (1)
- # datomic (12)
- # emacs (14)
- # hoplon (350)
- # immutant (2)
- # jobs (2)
- # jobs-discuss (23)
- # keechma (74)
- # liberator (1)
- # off-topic (1)
- # om (127)
- # onyx (54)
- # parinfer (74)
- # pedestal (1)
- # proton (5)
- # re-frame (6)
- # reagent (4)
- # remote-jobs (17)
- # ring-swagger (1)
- # slack-help (5)
- # untangled (16)
- # yada (21)
I’m trying to make scrolling within a page (e.g. when the user clicks a link that takes them to an anchor elsewhere on the page) smooth. Since I use reanimated already my first try was to use anim/interpolate-to
, but then I need to do the scrolling from within a rendered component (at least I think so, reagent noob here) and I suppose there must be much better ways to do it. Any ideas?
@pez I usually rely on for this kind of stuff:
(defn scroll! [el start end time]
(.play (goog.fx.dom.Scroll. el (clj->js start) (clj->js end) time)))
@martinklepsch: Yes, that works. Much better than my first attempt which triggered component updates at each step in the easing. It glitched at times too, which the way doesn’t.