This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-20
Channels
- # aleph (2)
- # boot (18)
- # cider (3)
- # cljs-dev (14)
- # cljsrn (28)
- # clojure (428)
- # clojure-austin (3)
- # clojure-hk (1)
- # clojure-ireland (5)
- # clojure-mexico (1)
- # clojure-quebec (2)
- # clojure-russia (49)
- # clojure-spec (138)
- # clojure-uk (45)
- # clojurescript (70)
- # core-async (1)
- # cursive (8)
- # datomic (13)
- # defnpodcast (3)
- # devops (1)
- # editors (4)
- # events (1)
- # funcool (14)
- # hoplon (17)
- # jobs-rus (1)
- # luminus (5)
- # mount (51)
- # off-topic (21)
- # om (9)
- # om-next (8)
- # onyx (43)
- # planck (6)
- # re-frame (13)
- # reagent (18)
- # ring-swagger (1)
- # spacemacs (17)
- # untangled (18)
- # vim (13)
- # yada (21)
@adamw Give http://plottablejs.org/ a try π Itβs also reactive to boot!
@levitanong: will do thanks!
Ok so annoying javelin question. I am probably doing this the wrong way, any suggestions greatly welcomed. I have a cell that responds when window size changes (couples a resize listener to a cell) and if so, triggers a pdf/js re-render. This actually returns a promise, and it's not a good idea to call .render() again while it's rendering (does weird stuff). So I would like to gate my cell on both size changed & not currently rendering. This is what I tried:
(defn page-size [page canvas pg-width pg-height]
(let [
rendering (cell false)
]
; set canvas size and re-render page
(cell= (let [...other stuff...]
(when (not rendering)
(reset! rendering true)
(.then (.render page render-context) #(reset! rendering false))
)))))
problem of course is that I can't (reset! rendering true)
inside the (cell=
because rendering
is passed as the value, -not- the cell. Is there a way to get a hold of the actual cell so I can set it to false. And if I do will it cause weird stuff to happen on propagation (since the current cell depends on rendering
as well)? Any suggestions? π
hi d3 is quite complicated, i really liked the convenience layer of http://c3js.org/
there is cljsjs package for it, but like most cljsjs packages it doesn't play very well with hoplon out of the box
plotte layer is ok if you need country maps for visualisation
@adamw: instead of using cell=
i would add-watch
... it seems like you're trying to handle an event, which is achieved most easily with callbacks
i should add that it's possible to do what you want using cells but without cell=... with javelin.core/formula. but i think it would be more hassle than callbacks
@alandipert: Ahh, ok thanks! Will give it a go
kudos for thinking in cells all the way tho π―
@happy.lisper: i haven't used it but https://github.com/Lambda-X/replumb looks interesting
@happy.lisper: https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/js.cljs is the lower level-way to go
example usage at the bottom of the file, i have driven this stuff successfully from cells in the past