mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 10:17:17 +02:00
♻️ Refactor thumbnails
This commit is contained in:
parent
0721fc9d80
commit
0494dc843f
18 changed files with 259 additions and 460 deletions
|
@ -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)
|
||||
|
|
15
frontend/src/app/util/imposters.cljs
Normal file
15
frontend/src/app/util/imposters.cljs
Normal 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))
|
Loading…
Add table
Add a link
Reference in a new issue