Skip to content

Commit

Permalink
add name for nodeMenu, arrow and endNode
Browse files Browse the repository at this point in the history
  • Loading branch information
alanlong9278 committed Feb 28, 2020
1 parent 8b0510b commit dfc6022
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,14 @@ export const drawSVGEdge = (
const [p1, p2] = calculateArrowPoints(endPoint, direction);
const points = [p1, endPoint, p2].map(p => `${p.x},${p.y}`).join(' ');
const arrow = (
<polyline key={`edge-${id}__arrow`} points={points} {...strokeProps} fill="none" strokeDasharray="none" />
<polyline
key={`edge-${id}__arrow`}
name={id}
points={points}
{...strokeProps}
fill="none"
strokeDasharray="none"
/>
);
elements.push(arrow);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const declareElementAttributes = (id: string) => {
[AttrNames.SelectedId]: `${id}${MenuTypes.NodeMenu}`,
};
};
export const NodeMenu = ({ id, onEvent }): JSX.Element => {
export const NodeMenu = ({ id, onEvent }) => {
const menuItems = [
{
key: 'delete',
Expand All @@ -35,6 +35,7 @@ export const NodeMenu = ({ id, onEvent }): JSX.Element => {

return (
<div
data-name="nodeMenu"
css={{
marginRight: '1px',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const StepEditor = ({ id, data, onEvent, trigger, addCoachMarkRef }): JSX
{ directed: true }
)}
<circle
name="editor__end"
r={TerminatorSize.height / 2 - 1}
cx={editorAxisX}
cy={contentBoundary.height + HeadSize.height + ElementInterval.y / 2 + TerminatorSize.height / 2}
Expand Down

0 comments on commit dfc6022

Please sign in to comment.