Skip to content

Commit

Permalink
try to fix clojure key renaming in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
rodmoioliveira committed May 16, 2020
1 parent fd35046 commit 7508c0d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/main/football/draw_graph.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
(defn draw-edges
"Draw the edges of passes between players."
[{:keys [^js edge config nodeshash active-node-store]}]
(let [source-x (-> edge .-source .-x)
source-y (-> edge .-source .-y)
target-x (-> edge .-target .-x)
target-y (-> edge .-target .-y)
(let [source-x (-> edge (aget "source") .-x)
source-y (-> edge (aget "source") .-y)
target-x (-> edge (aget "target") .-x)
target-y (-> edge (aget "target") .-y)
value (-> edge .-value)
source-target-distance (get-distance
source-x
Expand Down
4 changes: 2 additions & 2 deletions src/main/utils/core.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
(loop [i 0]
(let [interate? (< i nodes-length)
node (get nodes i)
dx (- x (-> node .-coord .-x))
dy (- y (-> node .-coord .-y))
dx (- x (-> node (aget "coord") .-x))
dy (- y (-> node (aget "coord") .-y))
dist-sq (+ (* dx dx) (* dy dy))
node-found? (< dist-sq rsq)]
(if node-found?
Expand Down

0 comments on commit 7508c0d

Please sign in to comment.