Skip to content

Commit

Permalink
Fix incorrect sizing of canvases, closes issue #36
Browse files Browse the repository at this point in the history
Plus probably another of other unnoticed css-bugs because hiccup doesn't
interpret :class-name anymore
  • Loading branch information
rrrnld committed Dec 26, 2018
1 parent 061fa17 commit aef4724
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/cljs/airsonic_ui/components/audio_player/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
(.fill))))

(defn current-progress [current-time seekable duration]
[canvas {:class-name "current-progress-canvas"
[canvas {:class "current-progress-canvas"
: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)
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/airsonic_ui/components/library/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[:ul (for [[idx [route label]] (map-indexed vector items)]
(let [[_ params _] route]
^{:key idx} [:li (when (= params active-item)
{:class-name "is-active"})
{:class "is-active"})
[:a {:href (apply url-for route)} label]]))]])

;; this variable determines how many pages before the first known page we should list
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/airsonic_ui/views/cover.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

(defn missing-cover
[item size]
[canvas {:class-name "missing-cover"
[canvas {:class "missing-cover"
:draw #(generate-cover % item)}])

(defn has-cover? [item]
Expand All @@ -45,7 +45,7 @@
[item size]
(let [original @(subscribe [::subs/cover-url item size])
retina @(subscribe [::subs/cover-url item (* 2 size)])]
[:figure {:class-name (str "image is-" size "x" size)}
[:figure {:class (str "image is-" size "x" size)}
(if (has-cover? item)
[:img {:src original
:srcSet (str original ", " retina " 2x")}]
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/airsonic_ui/views/notifications.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
(let [class (case (:level notification)
:error "danger"
"info")]
^{:key id} [:div {:class-name (str "notification is-small is-" class)}
^{:key id} [:div {:class (str "notification is-small is-" class)}
[:button.delete {:on-click #(dispatch [:notification/hide id])}]
(:message notification)]))])

0 comments on commit aef4724

Please sign in to comment.