From 8f9298fac8f687f6148a7981ba47013c3810de79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 7 May 2025 14:55:54 +0200 Subject: [PATCH] :recycle: Remove redundant calls to add_shape_fill --- frontend/src/app/render_wasm/api.cljs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/render_wasm/api.cljs b/frontend/src/app/render_wasm/api.cljs index 56a38d7b6f..7a14839618 100644 --- a/frontend/src/app/render_wasm/api.cljs +++ b/frontend/src/app/render_wasm/api.cljs @@ -224,13 +224,9 @@ (h/call wasm/internal-module "_add_shape_fill")) (some? gradient) - (let [_ nil] + (do (sr-fills/write-gradient-fill! offset heap gradient opacity) - (case (:type gradient) - :linear - (h/call wasm/internal-module "_add_shape_fill") - :radial - (h/call wasm/internal-module "_add_shape_fill"))) + (h/call wasm/internal-module "_add_shape_fill")) (some? image) (let [id (dm/get-prop image :id) @@ -266,11 +262,7 @@ (some? gradient) (let [_ nil] (sr-fills/write-gradient-fill! offset heap gradient opacity) - (case (:type gradient) - :linear - (h/call wasm/internal-module "_add_shape_stroke_fill") - :radial - (h/call wasm/internal-module "_add_shape_stroke_fill"))) + (h/call wasm/internal-module "_add_shape_stroke_fill")) (some? image) (let [id (dm/get-prop image :id)