Skip to content

Commit

Permalink
remove object allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
oatkiller committed Mar 30, 2020
1 parent 192fcba commit 797a29c
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,18 +117,6 @@ export const ProcessEventDot = styled(

const labelYHeight = markerSize / 1.7647;

const levelAttribute = adjacentNodeMap?.level
? {
'aria-level': adjacentNodeMap.level,
}
: {};

const flowToAttribute = adjacentNodeMap?.nextSibling
? {
'aria-flowto': adjacentNodeMap.nextSibling,
}
: {};

/**
* An element that should be animated when the node is clicked.
*/
Expand Down Expand Up @@ -175,8 +163,8 @@ export const ProcessEventDot = styled(
viewBox="-15 -15 90 30"
preserveAspectRatio="xMidYMid meet"
role="treeitem"
{...levelAttribute}
{...flowToAttribute}
aria-level={adjacentNodeMap.level}
aria-flowto={adjacentNodeMap.nextSibling}
aria-labelledby={labelId}
aria-describedby={descriptionId}
aria-haspopup={'true'}
Expand Down

0 comments on commit 797a29c

Please sign in to comment.