From 33ad2d94fbde2c0b039289d15756b85b4c073ff0 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 16 Jan 2024 16:59:08 +0100 Subject: [PATCH] :bug: Add proper default to cx and cy when parsing svg circle elements --- common/src/app/common/svg/shapes_builder.cljc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/src/app/common/svg/shapes_builder.cljc b/common/src/app/common/svg/shapes_builder.cljc index fc4b370ae..631393987 100644 --- a/common/src/app/common/svg/shapes_builder.cljc +++ b/common/src/app/common/svg/shapes_builder.cljc @@ -303,6 +303,11 @@ rx (d/nilv r rx) ry (d/nilv r ry) + + ;; There are some svg circles in the internet that does not + ;; have cx and cy attrs, so we default them to 0 + cx (d/nilv cx 0) + cy (d/nilv cy 0) origin (gpt/negate (gpt/point svg-data)) rect (grc/make-rect