diff --git a/frontend/src/app/main/ui/workspace/shapes.cljs b/frontend/src/app/main/ui/workspace/shapes.cljs index aa1ad4990..d45dd9149 100644 --- a/frontend/src/app/main/ui/workspace/shapes.cljs +++ b/frontend/src/app/main/ui/workspace/shapes.cljs @@ -41,7 +41,8 @@ (mf/defc root-shape "Draws the root shape of the viewport and recursively all the shapes" - {::mf/wrap-props false} + {::mf/wrap [mf/memo] + ::mf/wrap-props false} [props] (let [objects (obj/get props "objects") active-frames (obj/get props "active-frames") diff --git a/frontend/src/app/main/ui/workspace/shapes/frame.cljs b/frontend/src/app/main/ui/workspace/shapes/frame.cljs index 444502d14..7a7f2fa92 100644 --- a/frontend/src/app/main/ui/workspace/shapes/frame.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/frame.cljs @@ -114,11 +114,10 @@ (mf/deps all-children) (fn [] (->> all-children - (filter #(= :text (:type %))) + (filter #(and (= :text (:type %)) (not (:hidden %)))) (every? #(some? (:position-data %)))))) - show-thumbnail? - (and thumbnail? (some? (:thumbnail shape)) all-svg-text?)] + show-thumbnail? (and thumbnail? (some? (:thumbnail shape)) all-svg-text?)] [:g.frame-wrapper {:display (when (:hidden shape) "none")} [:> shape-container {:shape shape} diff --git a/frontend/src/app/main/ui/workspace/viewport/utils.cljs b/frontend/src/app/main/ui/workspace/viewport/utils.cljs index 4caedeeb1..c87ba7c97 100644 --- a/frontend/src/app/main/ui/workspace/viewport/utils.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/utils.cljs @@ -7,6 +7,7 @@ (ns app.main.ui.workspace.viewport.utils (:require [app.common.data :as d] + [app.common.data.macros :as dm] [app.common.geom.matrix :as gmt] [app.common.geom.point :as gpt] [app.main.ui.cursors :as cur] @@ -158,10 +159,10 @@ (dom/remove-attribute node "transform"))))))) (defn format-viewbox [vbox] - (str/join " " [(:x vbox 0) - (:y vbox 0) - (:width vbox 0) - (:height vbox 0)])) + (dm/str (:x vbox 0) " " + (:y vbox 0) " " + (:width vbox 0) " " + (:height vbox 0))) (defn translate-point-to-viewport [viewport zoom pt] (let [vbox (.. ^js viewport -viewBox -baseVal)