File tree Expand file tree Collapse file tree 5 files changed +3
-14
lines changed
libraries/sdk/src/main/starfederation/datastar/clojure/adapter
bb-example/src/main/bb_example/animation Expand file tree Collapse file tree 5 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 405405
406406(defn default-on-exception
407407 " Default [[on-exception]] callback, it returns `true` on [[IOException]] which
408- closes, the generator. It rethrows the exception wrapped with `ex-infor `
408+ closes, the generator. It rethrows the exception wrapped with `ex-info `
409409 otherwise."
410410 [_sse e ctx]
411411 (if (instance? IOException e)
Original file line number Diff line number Diff line change 4444(defn ping-handler
4545 ([req]
4646 (when-let [coords (recover-coords req)]
47- (println " -- ping " coords)
4847 (state/add-ping! coords))
4948 {:status 204 })
5049 ([req respond _raise]
5352
5453(defn random-pings-handler
5554 ([_req]
56- (println " -- add pixels" )
5755 (state/add-random-pings! )
5856 {:status 204 })
5957 ([req respond _raise]
6361
6462(defn reset-handler
6563 ([_req]
66- (println " -- reseting state" )
6764 (state/reset-state! )
6865 {:status 204 })
6966 ([req respond _raise]
7067 (respond (reset-handler req))))
7168
7269(defn step-handler
7370 ([_req]
74- (println " -- Step 1" )
7571 (state/step-state! )
7672 {:status 204 })
7773 ([req respond _raise]
8278
8379(defn play-handler
8480 ([_req]
85- (println " -- play animation" )
8681 (state/start-animating! )
8782 {:status 204 })
8883 ([req respond _raise]
9186
9287(defn pause-handler
9388 ([_req]
94- (println " -- pause animation" )
9589 (state/stop-animating! )
9690 {:status 204 })
9791 ([req respond _raise]
10094(defn resize-handler
10195 ([req]
10296 (let [{x " rows" y " columns" } (c/get-signals req)]
103- (println " -- resize" x y)
10497 (state/resize! x y)
10598 {:status 204 }))
10699 ([req respond _raise]
Original file line number Diff line number Diff line change 5757
5858
5959(defn cell-style [v]
60- (str " background-color: " v" ;} " ))
60+ (str " background-color: " v" ;" ))
6161
6262
6363(def on-click
Original file line number Diff line number Diff line change 8585 (u/clear-terminal! )
8686 (u/reboot-hk-server! #'handler-http-kit)
8787 (u/reboot-jetty-server! #'handler-ring {:async? true }))
88-
89-
90-
Original file line number Diff line number Diff line change 5757(defn rgb [r g b]
5858 (str " rgb(" r " , " g " , " b" )" ))
5959
60-
6160(defn cell-style [v]
62- (str " background-color: " v" ;} " ))
61+ (str " background-color: " v" ;" ))
6362
6463
6564(def on-click
You can’t perform that action at this time.
0 commit comments