Skip to content

Commit

Permalink
method name cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
rrmerugu committed Oct 22, 2023
1 parent be528ac commit 304d6b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/flow-canvas/nodeTemplates/DataTypeFieldsNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ const DataTypeFieldsNode = ({ id, data, selected }: CanvasNodeProps) => {
const { edges, getNodes, setNodes, setEdges } = store.getState();
const nodes = getNodes();

const MouseOver = (e: React.MouseEvent) => {
const onMouseOver = (e: React.MouseEvent) => {
let el = e.currentTarget;
const nodeId: string = el.getAttribute("data-node-id") || "";
const handleId: string | null = el.getAttribute("data-handle-id");
highlightHandlePathByNodeHandleId(nodeId, handleId, nodes, edges, setNodes, setEdges);
// https://github.com/wbkd/react-flow/issues/2418
};

const MouseOut = (e: React.MouseEvent) => {
const onMouseOut = (e: React.MouseEvent) => {
resetHandlePathHighlight(nodes, edges, setNodes, setEdges);
};

const handleClick = (e: React.MouseEvent) => {
MouseOver(e);
onMouseOver(e);
};

return (
Expand All @@ -68,8 +68,8 @@ const DataTypeFieldsNode = ({ id, data, selected }: CanvasNodeProps) => {
{data.fields && data.fields.map((field: NodeField) => (
<div
className="nodeField textLeft io"
onMouseOver={MouseOver}
onMouseOut={MouseOut}
onMouseOver={onMouseOver}
onMouseOut={onMouseOut}
id={generateFieldName(id, field.id)}
onClick={handleClick}
data-node-id={id}
Expand Down

0 comments on commit 304d6b0

Please sign in to comment.