diff --git a/frontend/src/app/main/ui/workspace/shapes/frame.cljs b/frontend/src/app/main/ui/workspace/shapes/frame.cljs index 522c17258..a0435e4ea 100644 --- a/frontend/src/app/main/ui/workspace/shapes/frame.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/frame.cljs @@ -128,7 +128,8 @@ [:& (mf/provider ctx/render-ctx) {:value render-id} [:g.frame-container {:id (dm/str "frame-container-" (:id shape)) :key "frame-container" - :ref on-frame-load} + :ref on-frame-load + :opacity (when (:hidden shape) 0)} [:& ff/fontfaces-style {:fonts fonts}] [:g.frame-thumbnail-wrapper {:id (dm/str "thumbnail-container-" (:id shape))} [:> frame/frame-thumbnail {:key (dm/str (:id shape)) diff --git a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs index 75cbaa64d..5c48945ba 100644 --- a/frontend/src/app/main/ui/workspace/viewport/widgets.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/widgets.cljs @@ -135,35 +135,36 @@ (on-frame-leave (:id frame)))) text-pos-x (if (:use-for-thumbnail? frame) 15 0)] - [:* - (when (:use-for-thumbnail? frame) - [:g {:transform (str (when (and selected? modifiers) - (str (:displacement modifiers) " ")) - (text-transform label-pos zoom))} - [:svg {:x 0 - :y -9 - :width 12 - :height 12 - :class "workspace-frame-icon" + (when (not (:hidden frame)) + [:* + (when (:use-for-thumbnail? frame) + [:g {:transform (str (when (and selected? modifiers) + (str (:displacement modifiers) " ")) + (text-transform label-pos zoom))} + [:svg {:x 0 + :y -9 + :width 12 + :height 12 + :class "workspace-frame-icon" + :style {:fill (when selected? "var(--color-primary-dark)")} + :visibility (if show-artboard-names? "visible" "hidden")} + [:use {:href "#icon-set-thumbnail"}]]]) + [:text {:x text-pos-x + :y 0 + :width width + :height 20 + :class "workspace-frame-label" + :transform (str (when (and selected? modifiers) + (str (:displacement modifiers) " ")) + (text-transform label-pos zoom)) :style {:fill (when selected? "var(--color-primary-dark)")} - :visibility (if show-artboard-names? "visible" "hidden")} - [:use {:href "#icon-set-thumbnail"}]]]) - [:text {:x text-pos-x - :y 0 - :width width - :height 20 - :class "workspace-frame-label" - :transform (str (when (and selected? modifiers) - (str (:displacement modifiers) " ")) - (text-transform label-pos zoom)) - :style {:fill (when selected? "var(--color-primary-dark)")} - :visibility (if show-artboard-names? "visible" "hidden") - :on-mouse-down on-mouse-down - :on-double-click on-double-click - :on-context-menu on-context-menu - :on-pointer-enter on-pointer-enter - :on-pointer-leave on-pointer-leave} - (:name frame)]])) + :visibility (if show-artboard-names? "visible" "hidden") + :on-mouse-down on-mouse-down + :on-double-click on-double-click + :on-context-menu on-context-menu + :on-pointer-enter on-pointer-enter + :on-pointer-leave on-pointer-leave} + (:name frame)]]))) (mf/defc frame-titles {::mf/wrap-props false diff --git a/frontend/src/app/worker/selection.cljs b/frontend/src/app/worker/selection.cljs index 138c79b06..692cf61ce 100644 --- a/frontend/src/app/worker/selection.cljs +++ b/frontend/src/app/worker/selection.cljs @@ -125,7 +125,8 @@ match-criteria? (fn [shape] (and (not (:hidden shape)) - (not (:blocked shape)) + (or (= :frame (:type shape)) ;; We return frames even if blocked + (not (:blocked shape))) (or (not frame-id) (= frame-id (:frame-id shape))) (case (:type shape) :frame include-frames?