diff --git a/src/cljs/airsonic_ui/components/audio_player/views.cljs b/src/cljs/airsonic_ui/components/audio_player/views.cljs index 8a51042..7583bd0 100644 --- a/src/cljs/airsonic_ui/components/audio_player/views.cljs +++ b/src/cljs/airsonic_ui/components/audio_player/views.cljs @@ -51,7 +51,7 @@ (defn current-progress [current-time seekable duration] [canvas {:class-name "current-progress-canvas" - :draw draw-progress} current-time seekable duration]) + :draw #(draw-progress % current-time seekable duration)}]) ;; FIXME: It's ugly to have the canvas padding and styling scattered everywhere (sass, drawing code above, and here) diff --git a/src/cljs/airsonic_ui/components/highres_canvas/views.cljs b/src/cljs/airsonic_ui/components/highres_canvas/views.cljs index 6c62bf7..54f2ee3 100644 --- a/src/cljs/airsonic_ui/components/highres_canvas/views.cljs +++ b/src/cljs/airsonic_ui/components/highres_canvas/views.cljs @@ -5,7 +5,7 @@ (:require [reagent.core :as reagent])) (defn redraw [this] - (let [[_ {draw :draw} & props] (reagent/argv this) + (let [draw (:draw (reagent/props this)) canvas (reagent/dom-node this) width (.-clientWidth canvas) height (.-clientHeight canvas) @@ -23,7 +23,7 @@ (set! (.. canvas -style -height) (str height "px")) (.setTransform ctx 1 0 0 1 0 0) (.scale ctx pixel-ratio pixel-ratio)) - (apply draw ctx props))) + (draw ctx))) (defn canvas [attrs & _] (reagent/create-class diff --git a/src/cljs/airsonic_ui/views/cover.cljs b/src/cljs/airsonic_ui/views/cover.cljs index 33efd36..8a0abfc 100644 --- a/src/cljs/airsonic_ui/views/cover.cljs +++ b/src/cljs/airsonic_ui/views/cover.cljs @@ -34,7 +34,7 @@ (defn missing-cover [item size] [canvas {:class-name "missing-cover" - :draw generate-cover} item]) + :draw #(generate-cover % item)}]) (defn has-cover? [item] (:coverArt item))