This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-12
Channels
- # announcements (1)
- # babashka (124)
- # beginners (98)
- # calva (54)
- # cider (32)
- # cljdoc (5)
- # cljs-dev (131)
- # cljsrn (1)
- # clojure (107)
- # clojure-australia (2)
- # clojure-europe (2)
- # clojure-losangeles (1)
- # clojure-norway (3)
- # clojure-uk (28)
- # clojurescript (21)
- # conjure (86)
- # core-async (7)
- # cursive (3)
- # datascript (5)
- # datomic (28)
- # defnpodcast (2)
- # devcards (1)
- # exercism (47)
- # fulcro (22)
- # graalvm (29)
- # graphql (1)
- # malli (5)
- # nrepl (31)
- # off-topic (111)
- # re-frame (23)
- # reitit (4)
- # spacemacs (6)
- # tools-deps (10)
- # tree-sitter (1)
- # xtdb (6)
I’d like to turn this into re-frame app, and I have moved most things to re-frame outside this namespace
but I’m not sure how to go about this, there’s a bunch of event handlers that need to be attached to a paperJS canvas
I did some side-effecty canvas thing here: https://github.com/nilenso/pencil.space/blob/cljs/client/cljs/src/home.cljs
But that’s a lot simpler, it doesn’t really have any canvas-level handlers that need to be executed
If you treat the canvas and drawing on it as a black box, what are the events that might happen to it from the other parts of your app?
Events triggered directly on it by e.g. a user don't count - those are part of the black box in my question.
For now, nothing, it’s nearly a blackbox interaction that gets triggered when I land on that page
And there might be other subtle interactions later, like because of some outside event, you cannot draw on this canvas anymore, etc.
Don't unroll such black boxes. Just create a component from it and pass something like :on-draw #(dispatch [::set-whatever-in-db %])
to it.
I think, it’ll be pure data, not necessarily paper related, it’ll just be the paths that the user drew