diff --git a/frontend/src/app/main/ui/dashboard/grid.cljs b/frontend/src/app/main/ui/dashboard/grid.cljs index 172f4f4ec..f4cf52eb2 100644 --- a/frontend/src/app/main/ui/dashboard/grid.cljs +++ b/frontend/src/app/main/ui/dashboard/grid.cljs @@ -7,6 +7,7 @@ (ns app.main.ui.dashboard.grid (:require-macros [app.main.style :as stl]) (:require + [app.common.data :as d] [app.common.data.macros :as dm] [app.common.geom.point :as gpt] [app.common.logging :as log] @@ -446,8 +447,9 @@ [:& loading-placeholder] (seq files) - (for [slice (partition-all limit files)] - [:ul {:class (stl/css :grid-row)} + (for [[index slice] (d/enumerate (partition-all limit files))] + + [:ul {:class (stl/css :grid-row) :key (dm/str index)} (when @dragging? [:li {:class (stl/css :grid-item)}]) (for [item slice] diff --git a/frontend/src/app/main/ui/shapes/custom_stroke.cljs b/frontend/src/app/main/ui/shapes/custom_stroke.cljs index b75b8fa31..32dfaf9b9 100644 --- a/frontend/src/app/main/ui/shapes/custom_stroke.cljs +++ b/frontend/src/app/main/ui/shapes/custom_stroke.cljs @@ -31,7 +31,7 @@ suffix (if (some? index) (dm/str "-" index) "") clip-id (dm/str "inner-stroke-" render-id "-" shape-id suffix) href (dm/str "#stroke-shape-" render-id "-" shape-id suffix)] - [:> "clipPath" #js {:id clip-id} + [:> "clipPath" {:id clip-id} [:use {:href href}]])) (mf/defc outer-stroke-mask @@ -473,7 +473,7 @@ shape-blur (get shape :blur) shape-fills (get shape :fills) shape-shadow (get shape :shadow) - shape-strokes (get shape :strokes) + shape-strokes (not-empty (get shape :strokes)) svg-attrs (attrs/get-svg-props shape render-id) @@ -481,24 +481,22 @@ (obj/clone) (attrs/add-layer-styles! shape)) - props (-> svg-attrs - (obj/merge! - {:id stroke-id - :className "strokes" - :style style})) + props (mf/spread-props svg-attrs + {:id stroke-id + :className "strokes" + :style style})] - props (if ^boolean (cfh/frame-shape? shape) - props - (cond-> props - (and (some? shape-blur) - (not ^boolean (:hidden shape-blur))) - (obj/set! "filter" (dm/fmt "url(#filter-blur-%)" render-id)) - (and (empty? shape-fills) - (some? (->> shape-shadow (remove :hidden) seq))) - (obj/set! "filter" (dm/fmt "url(#filter-%)" render-id))))] + (when-not ^boolean (cfh/frame-shape? shape) + (when (and (some? shape-blur) + (not ^boolean (:hidden shape-blur))) + (obj/set! props "filter" (dm/fmt "url(#filter-blur-%)" render-id))) - (when (d/not-empty? shape-strokes) + (when (and (empty? shape-fills) + (some? (->> shape-shadow (remove :hidden) not-empty))) + (obj/set! props "filter" (dm/fmt "url(#filter-%)" render-id)))) + + (when (some? shape-strokes) [:> :g props (for [[index value] (reverse (d/enumerate shape-strokes))] [:& shape-custom-stroke {:shape shape