diff --git a/frontend/src/app/main/ui/shapes/frame.cljs b/frontend/src/app/main/ui/shapes/frame.cljs index 414620027..bf48f0f37 100644 --- a/frontend/src/app/main/ui/shapes/frame.cljs +++ b/frontend/src/app/main/ui/shapes/frame.cljs @@ -8,15 +8,11 @@ (:require [app.common.data :as d] [app.main.ui.shapes.attrs :as attrs] - [app.main.ui.shapes.text.fontfaces :as ff] [app.util.object :as obj] [rumext.alpha :as mf])) (def frame-default-props {:fill-color "#ffffff"}) -(defn is-text? [{type :type}] - (= :text type)) - (defn frame-shape [shape-wrapper] (mf/fnc frame-shape @@ -26,8 +22,6 @@ shape (unchecked-get props "shape") {:keys [id width height]} shape - text-childs (->> childs (filterv is-text?)) - props (-> (merge frame-default-props shape) (attrs/extract-style-attrs) (obj/merge! @@ -37,7 +31,6 @@ :height height :className "frame-background"}))] [:* - [:& ff/fontfaces-style {:shapes text-childs}] [:> :rect props] (for [[i item] (d/enumerate childs)] [:& shape-wrapper {:frame shape diff --git a/frontend/src/app/main/ui/workspace/shapes/frame.cljs b/frontend/src/app/main/ui/workspace/shapes/frame.cljs index 592bb5d45..9387ad1ca 100644 --- a/frontend/src/app/main/ui/workspace/shapes/frame.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/frame.cljs @@ -10,6 +10,7 @@ [app.main.refs :as refs] [app.main.ui.shapes.frame :as frame] [app.main.ui.shapes.shape :refer [shape-container]] + [app.main.ui.shapes.text.fontfaces :as ff] [app.util.object :as obj] [app.util.timers :as ts] [beicon.core :as rx] @@ -92,11 +93,12 @@ (fn [node] (ts/schedule-on-idle #(reset! rendered? (some? node)))))] - (when (and shape (not (:hidden shape))) + (when (some? shape) [:g.frame-wrapper {:display (when (:hidden shape) "none")} (when-not show-thumbnail? [:> shape-container {:shape shape :ref on-dom} + [:& ff/fontfaces-style {:shapes children}] [:& frame-shape {:shape shape :childs children}]])