♻️ Refactor thumbnails

This commit is contained in:
Aitor 2023-09-04 11:20:11 +02:00 committed by Andrey Antukh
parent 0721fc9d80
commit 0494dc843f
18 changed files with 259 additions and 460 deletions

View file

@ -326,6 +326,11 @@
(.removeChild ^js el child))
el)
(defn remove!
[^js el]
(when (some? el)
(.remove ^js el)))
(defn get-first-child
[^js el]
(when (some? el)

View file

@ -0,0 +1,15 @@
;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) KALEIDOS INC
(ns app.util.imposters)
;; This is needed to avoid a circular dependency between
;; app.main.ui.workspace.shapes.frame and app.util.imposters
(defonce render-fn (atom nil))
(defn init!
[fn]
(reset! render-fn fn))