                         "translateZ(" (:z layout) "px)"))
           zoom-transform (when layout
                            (str
-                             "translateZ(" (if extended? 100 0) "px)"))]
+                             "translateZ(" (if extended? person-card-z-level 0) "px)"))]
       (dom/div {:class     (str "person-card"
                              (when layout " has-layout")
                              (anim-class expansion-anim " expanding")

            [faceboard.state :refer [app-state]]
            [faceboard.logging :refer [log log-err log-warn log-info]])
  (:require-macros [faceboard.macros.utils :refer [profile, measure]]))

(defcomponent social-section-item-component [data _ _]
  (render [_]

  ISeqable
  (-seq [nl] (array-seq nl 0)))

(defn retrieve-card-layout [card]
  (if-let [person-id (.getAttribute card "data-fbid")]
    [person-id {:left (.-offsetLeft card)
                :top  (.-offsetTop card)
                :z    (- person-card-z-level)}]))

(defn retrieve-cards-layout [cards]
  (apply hash-map (mapcat retrieve-card-layout cards)))

(defn recompute-layout [node data]
  (let [cards (.-childNodes node)
        current-layout (get-in @app-state [:transient (:id data) :layout])
        layout (retrieve-cards-layout cards)]
    (when-not (= (pr-str current-layout) (pr-str layout))
      (perform! :update-people-layout (:id data) layout))))

