                                             :marginTop       img-margin-top
                                             :height          img-height}
                             :onClick   #(put! chan-thumb-show-in-full-screen-app-init {:src src})
-                            :onLoad    img-on-load}))
+                            :onLoad    img-setup}))
              (dom/h2 nil (get-in @app [i :top_description] ""))
              (dom/p nil (get-in @app [i :description] "")))))))))
 


    om/IRenderState
    (render-state [_ {:keys [i deg div-id div-height img-id img-margin-top img-height]}]
      (letfn [(img-on-load []
                (println "IMG loaded")
                (om/update-state!
                 own (fn [{:keys [div-id img-id deg] :as state}]
                       (let [r?    (or (= deg 90) (= deg 270))

                             img-w (-> img-id by-id .-clientWidth)
                             img-h (-> img-id by-id .-clientHeight)
                             fat?  (>= img-w img-h)]
                         (assoc state
                                :img-margin-top (when r?
                                                  (if fat?
                                                    (* 0.5 (- img-w img-h))
