            :display "inline-block"
            :vertical-align "top"}]]])]))
 
-(defn arrow-view [direction]
+(defn arrow-view
+  "Show an arrow, pointing in the direction given by `direction`;
+  either `:left` or `:right`."
+  [direction]
   (let [[w h] [30 120]
         x1 (case direction :left 5 :right w)
         x2 (case direction :left w :right 5)]


                        (set! (.-scrollLeft (@state :container)) target-x)))

        touch-end! (fn [e]
                     (swap! state assoc :dragging? false))


             (for [[idx panel-item] (map-indexed vector panel-items)]
               ^{:key (:id panel-item)}
               [:div.panel
                [panel-view panel-item]
                (when (not= idx 0)
                  [:div.arrow-prev
                   {:on-click (fn [_] (scroll-prev!))}
                   [arrow-view :left]])
                (when (not= idx (dec (count panel-items)))
                  [:div.arrow-next
                   {:on-click (fn [_] (scroll-next!))}
                   [arrow-view :right]])]))]])})))
