diff --git a/frontend/src/app/main/ui/shapes/shape.cljs b/frontend/src/app/main/ui/shapes/shape.cljs index 820b62746..c7ea0ebf3 100644 --- a/frontend/src/app/main/ui/shapes/shape.cljs +++ b/frontend/src/app/main/ui/shapes/shape.cljs @@ -69,7 +69,7 @@ wrapper-props (-> (obj/clone props) - (obj/without ["shape" "children"]) + (obj/without ["shape" "children" "disable-shadows?"]) (obj/set! "ref" ref) (obj/set! "id" (dm/fmt "shape-%" (:id shape))) (obj/set! "style" styles)) diff --git a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs index 72683d8e7..a6f488149 100644 --- a/frontend/src/app/main/ui/workspace/viewport/hooks.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/hooks.cljs @@ -229,10 +229,12 @@ (defn setup-active-frames [objects hover-ids selected active-frames zoom transform vbox] - (let [frame? #(= :frame (get-in objects [% :type])) - all-frames (mf/use-memo (mf/deps objects) #(cph/get-root-frames-ids objects)) + (let [all-frames (mf/use-memo (mf/deps objects) #(cph/get-root-frames-ids objects)) selected-frames (mf/use-memo (mf/deps selected) #(->> all-frames (filter selected))) - xf-selected-frame (comp (remove frame?) (map #(get-in objects [% :frame-id]))) + + xf-selected-frame (comp (remove cph/root-frame?) + (map #(cph/get-shape-id-root-frame objects %))) + selected-shapes-frames (mf/use-memo (mf/deps selected) #(into #{} xf-selected-frame selected)) active-selection (when (and (not= transform :move) (= (count selected-frames) 1)) (first selected-frames)) @@ -255,7 +257,7 @@ ;; - If no hovering over any frames we keep the previous active one ;; - Check always that the active frames are inside the vbox - (let [hover-ids? (set @hover-ids) + (let [hover-ids? (set (->> @hover-ids (map #(cph/get-shape-id-root-frame objects %)))) is-active-frame? (fn [id]