Skip to content

Commit

Permalink
FIX Stop drawing grid on each grid click
Browse files Browse the repository at this point in the history
  • Loading branch information
kapilreddy committed Oct 26, 2024
1 parent 6a2982d commit 0e13a8c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions r_place_ui/src/place/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@
(:current-color @app-state))]
(draw-pixel x y color)
(send-pixel! (Math/floor (/ x grid-size))
(Math/floor (/ y grid-size))
color)
(draw-grid)))
Math/floor
color)))

(events/listen canvas "click" handle-canvas-click)

Expand Down Expand Up @@ -99,12 +98,7 @@



(def socket* (setup-ws "ws://localhost:8080/ws"
(fn []
(js/console.log "Socket connected"))
(fn [e]
(js/console.log e.data)
(websocket-message-handler e.data)))))
)


(comment
Expand All @@ -125,6 +119,13 @@
on-message-fn)
socket))

(do (def socket* (setup-ws "ws://localhost:8080/ws"
(fn []
(js/console.log "Socket connected"))
(fn [e]
(js/console.log e.data)
(websocket-message-handler e.data)))))


(def sample-data {:column 0
:row 1
Expand Down

0 comments on commit 0e13a8c

Please sign in to comment.