Skip to content

Commit

Permalink
feat(path): updates to latest path, adds new shapes
Browse files Browse the repository at this point in the history
updated to latest path, added new shapes, fix test to account for new toString method
  • Loading branch information
Joe Maddalone committed Jan 18, 2021
1 parent d8ada98 commit 5333567
Show file tree
Hide file tree
Showing 12 changed files with 1,326 additions and 555 deletions.
322 changes: 209 additions & 113 deletions README.md

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions example/src/docs/demos.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,42 @@ const demos = {
cx: basicSvgDimensions.w / 2,
cy: basicSvgDimensions.h / 2
}
],
cross: [
{
svgDimensions: { ...basicSvgDimensions },
width: 95,
height: 95,
cx: basicSvgDimensions.w / 2,
cy: basicSvgDimensions.h / 2
}
],
symX: [
{
svgDimensions: { ...basicSvgDimensions },
width: 95,
height: 95,
cx: basicSvgDimensions.w / 2,
cy: basicSvgDimensions.h / 2
}
],
symI: [
{
svgDimensions: { ...basicSvgDimensions },
width: 95,
height: 95,
cx: basicSvgDimensions.w / 2,
cy: basicSvgDimensions.h / 2
}
],
symH: [
{
svgDimensions: { ...basicSvgDimensions },
width: 95,
height: 95,
cx: basicSvgDimensions.w / 2,
cy: basicSvgDimensions.h / 2
}
]
},
curves: {
Expand Down
92 changes: 92 additions & 0 deletions example/src/docs/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,98 @@ const docs = {
nestingProps: centeredShapeNestingProps,
shorthands: [shorthands.cxy]
},
symX: {
category: 'basicShapes',
Component: 'SymX',
command: 'symX',
args: ['width', 'height', 'cx', 'cy', 'centerEnd'],
description:
'SymX draws an X shape from center point (cx & cy). The cursor is then moved to the center point.',
props: {
width: {
...commonNumber,
description: 'Width of the X.'
},
height: {
...commonNumber,
description: 'Height of the X.'
},
cx,
cy,
centerEnd
},
nestingProps: centeredShapeNestingProps,
shorthands: [shorthands.cxy]
},
symI: {
category: 'basicShapes',
Component: 'SymI',
command: 'symI',
args: ['width', 'height', 'cx', 'cy', 'centerEnd'],
description:
'SymI draws an I shape from center point (cx & cy). The cursor is then moved to the center point.',
props: {
width: {
...commonNumber,
description: 'Width of the I.'
},
height: {
...commonNumber,
description: 'Height of the I.'
},
cx,
cy,
centerEnd
},
nestingProps: centeredShapeNestingProps,
shorthands: [shorthands.cxy]
},
symH: {
category: 'basicShapes',
Component: 'SymH',
command: 'symH',
args: ['width', 'height', 'cx', 'cy', 'centerEnd'],
description:
'SymH draws an H shape from center point (cx & cy). The cursor is then moved to the center point.',
props: {
width: {
...commonNumber,
description: 'Width of the H.'
},
height: {
...commonNumber,
description: 'Height of the H.'
},
cx,
cy,
centerEnd
},
nestingProps: centeredShapeNestingProps,
shorthands: [shorthands.cxy]
},
cross: {
category: 'basicShapes',
Component: 'Cross',
command: 'cross',
args: ['width', 'height', 'cx', 'cy', 'centerEnd'],
description:
'Cross draws an "cross" shape from center point (cx & cy). The cursor is then moved to the center point.',
props: {
width: {
...commonNumber,
description: 'Width of the Cross.'
},
height: {
...commonNumber,
description: 'Height of the Cross.'
},
cx,
cy,
centerEnd
},
nestingProps: centeredShapeNestingProps,
shorthands: [shorthands.cxy]
},
arc: {
category: 'curves',
Component: 'Arc',
Expand Down
12 changes: 12 additions & 0 deletions example/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@
"quad": {
"description": "Quad is drawn from an sx and sy to an ex and ey with one control points (cx & cy)."
},
"cross": {
"description": "Cross draws a cross shape from center point (cx & cy). The cursor is then moved to the center point."
},
"symX": {
"description": "SymX draws an X shape from center point (cx & cy). The cursor is then moved to the center point."
},
"symH": {
"description": "SymH draws an H shape from center point (cx & cy). The cursor is then moved to the center point."
},
"symI": {
"description": "SymI draws an I shape from center point (cx & cy). The cursor is then moved to the center point."
},
"pages": {
"introduction": {
"title": "Introduction",
Expand Down

0 comments on commit 5333567

Please sign in to comment.