@@ -139,7 +143,7 @@ function DefaultOverviewPane({
{relTypes && visibleRelationshipKeys.length !== 0 && (
@@ -179,9 +183,10 @@ function DefaultOverviewPane({
)}
{nodeCount !== null &&
relationshipCount !== null &&
- `Displaying ${numberToUSLocale(
- nodeCount
- )} nodes, ${numberToUSLocale(relationshipCount)} relationships.`}
+ t('graph summary', {
+ nodeCount: numberToUSLocale(nodeCount),
+ relationshipCount: numberToUSLocale(relationshipCount)
+ })}
diff --git a/src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/RelType.tsx b/src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/RelType.tsx
index 8b4cbd62969..662d4c6cac3 100644
--- a/src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/RelType.tsx
+++ b/src/neo4j-arc/graph-visualization/GraphVisualizer/DefaultPanelContent/RelType.tsx
@@ -21,28 +21,54 @@ import React from 'react'
import { GraphStyleModel } from '../../models/GraphStyle'
import { NonClickableRelTypeChip } from './styled'
+import {
+ GraphInteractionCallBack,
+ REL_TYPE_UPDATE
+} from '../Graph/GraphEventHandlerModel'
export type RelTypeProps = {
graphStyle: GraphStyleModel
selectedRelType: { relType: string; propertyKeys: string[]; count?: number }
+ onGraphInteraction?: GraphInteractionCallBack
+ sourceNodeId?: string
+ targetNodeId?: string
+}
+RelType.defaultProps = {
+ onGraphInteraction: () => undefined
}
export function RelType({
selectedRelType,
- graphStyle
+ graphStyle,
+ onGraphInteraction = () => undefined,
+ sourceNodeId,
+ targetNodeId
}: RelTypeProps): JSX.Element {
const styleForRelType = graphStyle.forRelationship({
type: selectedRelType.relType
})
return (
-
+ onGraphInteraction(REL_TYPE_UPDATE, {
+ sourceNodeId: sourceNodeId,
+ targetNodeId: targetNodeId,
+ oldType: selectedRelType.relType,
+ newType: e.currentTarget.textContent
+ })
+ }
>
- {selectedRelType.count !== undefined
- ? `${selectedRelType.relType} (${selectedRelType.count})`
- : `${selectedRelType.relType}`}
-
+
+ {selectedRelType.count !== undefined
+ ? `${selectedRelType.relType} (${selectedRelType.count})`
+ : `${selectedRelType.relType}`}
+
+
)
}
diff --git a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/Graph.tsx b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/Graph.tsx
index 6592728a8d6..9a92ec8e2ef 100644
--- a/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/Graph.tsx
+++ b/src/neo4j-arc/graph-visualization/GraphVisualizer/Graph/Graph.tsx
@@ -24,7 +24,8 @@ import {
BasicRelationship,
ZoomInIcon,
ZoomOutIcon,
- ZoomToFitIcon
+ ZoomToFitIcon,
+ deepEquals
} from '../../../common'
import { GraphModel } from '../../models/Graph'
@@ -218,6 +219,18 @@ export class Graph extends React.Component