Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Commit

Permalink
updated circle shape
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav300 committed Apr 1, 2020
1 parent 6e3ec77 commit 29f5683
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/main/js/core/Shape/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import utils from "../../helpers/utils";
* @private
*/
const tagList = {
PATH: "path",
CIRCLE: "circle",
RECT: "rect",
POLYGON: "polygon",
PATH: "path",
G: "g",
STYLE: "style"
};
Expand Down Expand Up @@ -97,7 +97,7 @@ const appendSVGChildren = (groupElement, shape, transformFn, scale, legend=false
if (!shape[tagList[el]]) {
return;
}
if (legend === true || el !== "PATH") {
if (legend === true || el === "PATH") {
setSVGChildProperty(groupElement, tagList[el], shape[tagList[el]]);
}
});
Expand Down Expand Up @@ -159,6 +159,7 @@ const createSVG = (
"pointer-events",
additionalAttributes["pointer-events"] ? "none" : "auto"
)
.attr("xmlns", "http://www.w3.org/2000/svg")
.on("click", onClickFn);

if (includeViewBox) {
Expand Down
8 changes: 5 additions & 3 deletions src/main/js/core/Shape/shapeDefinitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ export const CIRCLE = {
circle: {
cx: "24",
cy: "24",
r: "24"
r: "22",
"stroke-width": "4",
stroke: "#FFF",
fill: "none"
},
path: {
d: "M24 5c10.5 0 19 8.5 19 19s-8.5 19-19 19S5 34.5 5 24 13.5 5 24 5m0-5C10.7 0 0 10.7 0 24s10.7 24 24 24 24-10.7 24-24S37.3 0 24 0z",
fill: "#FFF"
d: "M2,24 a22,22 0 1,0 44,0 a22,22 0 1,0 -44,0z ",
},
options: { x: -5, y: -5, scale: 0.2 },
};
Expand Down

0 comments on commit 29f5683

Please sign in to comment.