From 614bcf14259810732082561757f4660d47a80d23 Mon Sep 17 00:00:00 2001 From: Greg Hardin Date: Sat, 6 Oct 2018 14:59:33 -0700 Subject: [PATCH] Feature/right clicking (#124) * Added the ability to right click on nodes and links. * Updating Readme --- README.md | 10 ++++ src/components/graph/Graph.jsx | 22 +++++++++ src/components/graph/graph.helper.js | 2 + src/components/link/Link.jsx | 15 ++++++ src/components/node/Node.jsx | 13 +++++ test/component/graph/graph.helper.test.js | 3 ++ .../__snapshots__/graph.snapshot.test.js.snap | 48 +++++++++++++++++++ .../__snapshots__/link.snapshot.test.js.snap | 1 + .../__snapshots__/node.snapshot.test.js.snap | 1 + 9 files changed, 115 insertions(+) diff --git a/README.md b/README.md index beae91c92..275563dd9 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,10 @@ const onClickNode = function(nodeId) { window.alert(`Clicked node ${nodeId}`); }; +const onRightClickNode = function(event, nodeId) { + window.alert(`Right clicked node ${nodeId}`); +}; + const onMouseOverNode = function(nodeId) { window.alert(`Mouse over node ${nodeId}`); }; @@ -85,6 +89,10 @@ const onClickLink = function(source, target) { window.alert(`Clicked link between ${source} and ${target}`); }; +const onRightClickLink = function(event, source, target) { + window.alert(`Right clicked link between ${source} and ${target}`); +}; + const onMouseOverLink = function(source, target) { window.alert(`Mouse over in link between ${source} and ${target}`); }; @@ -98,8 +106,10 @@ const onMouseOutLink = function(source, target) { data={data} config={myConfig} onClickNode={onClickNode} + onRightClickNode={onRightClickNode} onClickGraph={onClickGraph} onClickLink={onClickLink} + onRightClickLink={onRightClickLink} onMouseOverNode={onMouseOverNode} onMouseOutNode={onMouseOutNode} onMouseOverLink={onMouseOverLink} diff --git a/src/components/graph/Graph.jsx b/src/components/graph/Graph.jsx index 43e9d5fe1..8a6332c27 100644 --- a/src/components/graph/Graph.jsx +++ b/src/components/graph/Graph.jsx @@ -57,6 +57,10 @@ import utils from '../../utils'; * window.alert('Clicked node ${nodeId}'); * }; * + * const onRightClickNode = function(event, nodeId) { + * window.alert('Right clicked node ${nodeId}'); + * }; + * * const onMouseOverNode = function(nodeId) { * window.alert(`Mouse over node ${nodeId}`); * }; @@ -69,6 +73,10 @@ import utils from '../../utils'; * window.alert(`Clicked link between ${source} and ${target}`); * }; * + * const onRightClickLink = function(event, source, target) { + * window.alert('Right clicked link between ${source} and ${target}'); + * }; + * * const onMouseOverLink = function(source, target) { * window.alert(`Mouse over in link between ${source} and ${target}`); * }; @@ -83,7 +91,9 @@ import utils from '../../utils'; * config={myConfig} * onClickGraph={onClickGraph} * onClickNode={onClickNode} + * onRightClickNode={onRightClickNode} * onClickLink={onClickLink} + * onRightClickLink={onRightClickLink} * onMouseOverNode={onMouseOverNode} * onMouseOutNode={onMouseOutNode} * onMouseOverLink={onMouseOverLink} @@ -383,6 +393,16 @@ export default class Graph extends React.Component { this.props.onClickNode && this.props.onClickNode(clickedNodeId); }; + /** + * Calls the callback passed to the component. + * @param {Object} event - the event object generated by the event. + * @param {string} clickedNodeId - The id of the node where the click was performed. + * @returns {undefined} + */ + onRightClickNode = (event, clickedNodeId) => { + this.props.onRightClickNode && this.props.onRightClickNode(event, clickedNodeId); + }; + /** * Calls the callback passed to the component. * @param {Object} e - The event of onClick handler. @@ -405,6 +425,7 @@ export default class Graph extends React.Component { this.state.nodes, { onClickNode: this.onClickNode, + onRightClickNode: this.onRightClickNode, onMouseOverNode: this.onMouseOverNode, onMouseOut: this.onMouseOutNode }, @@ -412,6 +433,7 @@ export default class Graph extends React.Component { this.state.links, { onClickLink: this.props.onClickLink, + onRightClickLink: this.onRightClickLink, onMouseOverLink: this.onMouseOverLink, onMouseOutLink: this.onMouseOutLink }, diff --git a/src/components/graph/graph.helper.js b/src/components/graph/graph.helper.js index 2212a4567..93784f586 100644 --- a/src/components/graph/graph.helper.js +++ b/src/components/graph/graph.helper.js @@ -288,6 +288,7 @@ function buildLinkProps(link, nodes, links, config, linkCallbacks, highlightedNo className: CONST.LINK_CLASS_NAME, opacity, onClickLink: linkCallbacks.onClickLink, + onRightClickLink: linkCallbacks.onRightClickLink, onMouseOverLink: linkCallbacks.onMouseOverLink, onMouseOutLink: linkCallbacks.onMouseOutLink }; @@ -344,6 +345,7 @@ function buildNodeProps(node, config, nodeCallbacks = {}, highlightedNode, highl id: node.id, label: node[config.node.labelProperty] || node.id, onClickNode: nodeCallbacks.onClickNode, + onRightClickNode: nodeCallbacks.onRightClickNode, onMouseOverNode: nodeCallbacks.onMouseOverNode, onMouseOut: nodeCallbacks.onMouseOut, opacity, diff --git a/src/components/link/Link.jsx b/src/components/link/Link.jsx index 6815f8f67..58b5f738e 100644 --- a/src/components/link/Link.jsx +++ b/src/components/link/Link.jsx @@ -7,6 +7,10 @@ import React from 'react'; * window.alert(`Clicked link between ${source} and ${target}`); * }; * + * const onRightClickLink = function(event, source, target) { + * window.alert(`Right clicked link between ${source} and ${target}`); + * }; + * * const onMouseOverLink = function(source, target) { * window.alert(`Mouse over in link between ${source} and ${target}`); * }; @@ -29,6 +33,7 @@ import React from 'react'; * opacity=1 * mouseCursor='pointer' * onClickLink={onClickLink} + * onRightClickLink={onRightClickLink} * onMouseOverLink={onMouseOverLink} * onMouseOutLink={onMouseOutLink} /> */ @@ -39,6 +44,15 @@ export default class Link extends React.Component { */ handleOnClickLink = () => this.props.onClickLink && this.props.onClickLink(this.props.source, this.props.target); + /** + * Handle link right click event. + * @param {Object} event - the event object + * @returns {undefined} + */ + handleOnRightClickLink = event => { + this.props.onRightClickLink && this.props.onRightClickLink(event, this.props.source, this.props.target); + }; + /** * Handle mouse over link event. * @returns {undefined} @@ -66,6 +80,7 @@ export default class Link extends React.Component { className: this.props.className, d: this.props.d, onClick: this.handleOnClickLink, + onContextMenu: this.handleOnRightClickLink, onMouseOut: this.handleOnMouseOutLink, onMouseOver: this.handleOnMouseOverLink, style: lineStyle, diff --git a/src/components/node/Node.jsx b/src/components/node/Node.jsx index 61f303121..c7710aa04 100644 --- a/src/components/node/Node.jsx +++ b/src/components/node/Node.jsx @@ -11,6 +11,10 @@ import nodeHelper from './node.helper'; * window.alert('Clicked node', nodeId); * }; * + * const onRightClickNode = function(event, nodeId) { + * window.alert('Right clicked node', nodeId); + * } + * * const onMouseOverNode = function(nodeId) { * window.alert('Mouse over node', nodeId); * }; @@ -39,6 +43,7 @@ import nodeHelper from './node.helper'; * viewGenerator=(node) => * className='node' * onClickNode={onClickNode} + * onRightClickNode={onRightClickNode} * onMouseOverNode={onMouseOverNode} * onMouseOutNode={onMouseOutNode} /> */ @@ -49,6 +54,13 @@ export default class Node extends React.Component { */ handleOnClickNode = () => this.props.onClickNode && this.props.onClickNode(this.props.id); + /** + * Handle right click on the node. + * @param {Object} event - the event object + * @returns {undefined} + */ + handleOnRightClickNode = event => this.props.onRightClickNode && this.props.onClickNode(event, this.props.id); + /** * Handle mouse over node event. * @returns {undefined} @@ -65,6 +77,7 @@ export default class Node extends React.Component { const nodeProps = { cursor: this.props.cursor, onClick: this.handleOnClickNode, + onContextMenu: this.handleOnRightClickNode, onMouseOut: this.handleOnMouseOutNode, onMouseOver: this.handleOnMouseOverNode, opacity: this.props.opacity diff --git a/test/component/graph/graph.helper.test.js b/test/component/graph/graph.helper.test.js index d6960453d..283b2199b 100644 --- a/test/component/graph/graph.helper.test.js +++ b/test/component/graph/graph.helper.test.js @@ -114,6 +114,7 @@ describe('Graph Helper', () => { id: 'id', label: 'id', onClickNode: undefined, + onRightClickNode: undefined, onMouseOut: undefined, onMouseOverNode: undefined, opacity: 1, @@ -159,6 +160,7 @@ describe('Graph Helper', () => { id: 'id', label: 'id', onClickNode: undefined, + onRightClickNode: undefined, onMouseOut: undefined, onMouseOverNode: undefined, opacity: undefined, @@ -203,6 +205,7 @@ describe('Graph Helper', () => { id: 'id', label: 'id', onClickNode: undefined, + onRightClickNode: undefined, onMouseOut: undefined, onMouseOverNode: undefined, opacity: undefined, diff --git a/test/snapshot/graph/__snapshots__/graph.snapshot.test.js.snap b/test/snapshot/graph/__snapshots__/graph.snapshot.test.js.snap index da23e4115..f3e7103d9 100644 --- a/test/snapshot/graph/__snapshots__/graph.snapshot.test.js.snap +++ b/test/snapshot/graph/__snapshots__/graph.snapshot.test.js.snap @@ -21,6 +21,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 140,20" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -41,6 +42,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 20,110" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -61,6 +63,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M30,184A0,0 0 0,1 305,745" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -81,6 +84,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M200,300A0,0 0 0,1 305,745" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -101,6 +105,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M120,270A0,0 0 0,1 305,745" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -121,6 +126,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M20,110A0,0 0 0,1 305,745" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -141,6 +147,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M190,609A0,0 0 0,1 305,745" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -161,6 +168,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 101,201" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -181,6 +189,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 2,200" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -201,6 +210,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M404,404A0,0 0 0,1 14,30" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -221,6 +231,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M305,745A0,0 0 0,1 20,110" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -241,6 +252,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 14,250" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -261,6 +273,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M30,184A0,0 0 0,1 190,609" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -281,6 +294,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M14,259A0,0 0 0,1 190,609" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -301,6 +315,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M409,500A0,0 0 0,1 190,609" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -321,6 +336,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M520,123A0,0 0 0,1 14,259" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -341,6 +357,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M190,609A0,0 0 0,1 14,259" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -361,6 +378,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M305,745A0,0 0 0,1 120,270" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -381,6 +399,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M14,20A0,0 0 0,1 120,270" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -401,6 +420,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M305,745A0,0 0 0,1 200,300" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -421,6 +441,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M40,200A0,0 0 0,1 200,300" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -441,6 +462,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M200,300A0,0 0 0,1 40,200" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -461,6 +483,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M20,1A0,0 0 0,1 90,90" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -481,6 +504,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M90,656A0,0 0 0,1 90,90" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -501,6 +525,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M190,609A0,0 0 0,1 30,184" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -521,6 +546,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M305,745A0,0 0 0,1 30,184" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -541,6 +567,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M190,609A0,0 0 0,1 409,500" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -561,6 +588,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` className="link" d="M120,270A0,0 0 0,1 14,20" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} style={ @@ -589,6 +617,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -618,6 +647,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -647,6 +677,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -676,6 +707,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -705,6 +737,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -734,6 +767,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -763,6 +797,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -792,6 +827,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -821,6 +857,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -850,6 +887,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -879,6 +917,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -908,6 +947,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -937,6 +977,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -966,6 +1007,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -995,6 +1037,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -1024,6 +1067,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -1053,6 +1097,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -1082,6 +1127,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -1111,6 +1157,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} @@ -1140,6 +1187,7 @@ exports[`Snapshot - Graph Component should match snapshot 1`] = ` d="M5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,-5.641895835477563,0A5.641895835477563,5.641895835477563,0,1,1,5.641895835477563,0" fill="red" onClick={[Function]} + onContextMenu={[Function]} onMouseOut={[Function]} onMouseOver={[Function]} opacity={1} diff --git a/test/snapshot/link/__snapshots__/link.snapshot.test.js.snap b/test/snapshot/link/__snapshots__/link.snapshot.test.js.snap index 662d106ed..98ad180ea 100644 --- a/test/snapshot/link/__snapshots__/link.snapshot.test.js.snap +++ b/test/snapshot/link/__snapshots__/link.snapshot.test.js.snap @@ -3,6 +3,7 @@ exports[`Snapshot - Link Component should match snapshot 1`] = `