diff --git a/frontend/src/app/main/ui/workspace/shapes/text/text_edition_outline.cljs b/frontend/src/app/main/ui/workspace/shapes/text/text_edition_outline.cljs index b7367a4431..76e52c9537 100644 --- a/frontend/src/app/main/ui/workspace/shapes/text/text_edition_outline.cljs +++ b/frontend/src/app/main/ui/workspace/shapes/text/text_edition_outline.cljs @@ -12,18 +12,20 @@ [app.main.features :as features] [app.main.refs :as refs] [app.main.store :as st] + [app.render-wasm.api :as wasm.api] [rumext.v2 :as mf])) (mf/defc text-edition-outline [{:keys [shape zoom modifiers]}] (if (features/active-feature? @st/state "render-wasm/v1") - (let [selrect-transform (mf/deref refs/workspace-selrect) - [{:keys [x y width height]} transform] (dsh/get-selrect selrect-transform shape)] + (let [{:keys [width height]} (wasm.api/get-text-dimensions (:id shape)) + selrect-transform (mf/deref refs/workspace-selrect) + [selrect transform] (dsh/get-selrect selrect-transform shape)] [:rect.main.viewport-selrect - {:x x - :y y - :width width - :height height + {:x (:x selrect) + :y (:y selrect) + :width (max width (:width selrect)) + :height (max height (:height selrect)) :transform transform :style {:stroke "var(--color-accent-tertiary)" :stroke-width (/ 1 zoom) diff --git a/frontend/src/app/worker/selection.cljs b/frontend/src/app/worker/selection.cljs index 36b1119d08..c3bbdde95c 100644 --- a/frontend/src/app/worker/selection.cljs +++ b/frontend/src/app/worker/selection.cljs @@ -257,7 +257,7 @@ (filter (if clip-children? (comp overlaps-parent? :clip-parents) (constantly true))) - (map :id)) + (keep :id)) result))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;