   (restore!)
   )
 
+(defn draw-highlight-layer!
+  [i]
+  (when i
+    (let [r (-> @state :js-face :r)
+          dr (get-core-dr r)
+          cr (- (get-core-radius i r) (/ dr 2))]
+
+      ;; highlight the layer
+      (line-width! dr)
+      (circle! 0 0 cr)
+      (stroke-style! "#1EA")
+      (stroke!))))
+
+
 (defn draw-es-captions!
   [{:keys [es3 es5 es6 es7 es8]}]
   (save!)

  (cond-> tween
    (keyword? tween) tweens))

(defn resolve-callback
  "If the callback is a state path, create the callback to set that path."
  [callback]
  (if-let [path (when (vector? callback) callback)]
    #(swap! state assoc-in path %)
    callback))

(defn animate!
  "Pass given animation values to the given callback.
   Returns a channel that closes when done."
  [{:keys [a b duration tween] :or {tween :swing} :as opts} callback]
  (let [tween (resolve-tween tween)
        callback (resolve-callback callback)
        c (chan)
        dv (- b a)]
    (tap tick-tap c)
    (go-loop [t 0]

                        (min 1)
                        (tween))
            v (+ a (* percent dv))]
        (swap! state assoc-in state-path v)
        (when (< t duration)
          (recur t)))
      (untap tick-tap c))))
