diff --git a/frontend/src/app/main/ui/workspace.cljs b/frontend/src/app/main/ui/workspace.cljs index 88cbdc113..244b1bb0b 100644 --- a/frontend/src/app/main/ui/workspace.cljs +++ b/frontend/src/app/main/ui/workspace.cljs @@ -162,7 +162,7 @@ (mf/defc workspace* - {::mf/wrap-props false + {::mf/props :obj ::mf/wrap [mf/memo]} [{:keys [project-id file-id page-id layout-name]}] diff --git a/frontend/src/app/main/ui/workspace/viewport.cljs b/frontend/src/app/main/ui/workspace/viewport.cljs index c839f6d91..8aa9942b8 100644 --- a/frontend/src/app/main/ui/workspace/viewport.cljs +++ b/frontend/src/app/main/ui/workspace/viewport.cljs @@ -622,7 +622,7 @@ :hover-disabled? hover-disabled?}])]) (when show-gradient-handlers? - [:& gradients/gradient-handlers + [:> gradients/gradient-handlers* {:id (first selected) :zoom zoom}]) diff --git a/frontend/src/app/main/ui/workspace/viewport/gradients.cljs b/frontend/src/app/main/ui/workspace/viewport/gradients.cljs index 8adb51820..9f5e2fbe0 100644 --- a/frontend/src/app/main/ui/workspace/viewport/gradients.cljs +++ b/frontend/src/app/main/ui/workspace/viewport/gradients.cljs @@ -441,8 +441,9 @@ :r (/ 4 zoom) :fill "var(--app-white)"}]))])) -(mf/defc gradient-handlers* - [{:keys [zoom stops gradient editing shape] :as kk}] +(mf/defc gradient-handlers-impl* + {::mf/props :obj} + [{:keys [zoom stops gradient editing shape]}] (let [transform (gsh/transform-matrix shape) transform-inverse (gsh/inverse-transform-matrix shape) @@ -509,8 +510,9 @@ :on-change-finish on-change-finish :on-change-width on-change-width}])) -(mf/defc gradient-handlers - {::mf/wrap [mf/memo]} +(mf/defc gradient-handlers* + {::mf/wrap [mf/memo] + ::mf/props :obj} [{:keys [id zoom]}] (let [shape-ref (mf/use-memo (mf/deps id) #(refs/object-by-id id)) shape (mf/deref shape-ref) @@ -520,7 +522,7 @@ editing-stop (:editing-stop state)] (when (and (some? gradient) (= id (:shape-id gradient))) - [:& gradient-handlers* + [:> gradient-handlers-impl* {:zoom zoom :gradient gradient :stops stops diff --git a/frontend/src/app/main/ui/workspace/viewport_wasm.cljs b/frontend/src/app/main/ui/workspace/viewport_wasm.cljs index 2f95a851e..7ca2c0048 100644 --- a/frontend/src/app/main/ui/workspace/viewport_wasm.cljs +++ b/frontend/src/app/main/ui/workspace/viewport_wasm.cljs @@ -617,7 +617,7 @@ :hover-disabled? hover-disabled?}])]) (when show-gradient-handlers? - [:& gradients/gradient-handlers + [:> gradients/gradient-handlers* {:id (first selected) :zoom zoom}])