     (do
       (aset canvas-context "strokeStyle" "aliceblue")
       (aset canvas-context "lineWidth" 6)
-      (.strokeRect canvas-context 0 2 100 96))
+      (.strokeRect canvas-context 2 2 96 96))
     mouse-over?
     (do
       (aset canvas-context "strokeStyle" "aliceblue")

                       :height      canvas-height
                       :style       #js {:opacity 0.3 :position "absolute" :left x-offset}
                       :ref         "canvas-ref"
                       :onMouseDown (fn [e] (om/set-state! owner :mouse-down true) (om/set-state! owner :mouse-down-pos [(.-clientX e) (.-clientY e)]))
                       :onMouseUp   #(om/set-state! owner :mouse-down false)
                       :onMouseOver #(om/set-state! owner :mouse-over true)
                       :onMouseOut  #(om/set-state! owner :mouse-over false)}
                  "no canvas"))))

             (- x1 x0))
          (- y1 y0)))))

(defn superlative-of [arr compar]
  (loop [i 0 min-val (aget arr 0)]
    (if (= i (.-length arr))
      min-val
      (let [cur-val (aget arr i)]
        (if (apply compar [cur-val min-val])
          (recur (inc i) cur-val)
          (recur (inc i) min-val))))))

(defn min-arr-val [arr]
  (superlative-of arr <))

(defn max-arr-val [arr]
  (superlative-of arr >))

(defn draw-select-rect! [canvas-width canvas-height canvas-context mouse-down? mouse-over?]
  (.clearRect canvas-context 0 0 canvas-width canvas-height)
