diff --git a/client/app/scripts/charts/nodes-chart.js b/client/app/scripts/charts/nodes-chart.js index e42e239a0..95ba8a467 100644 --- a/client/app/scripts/charts/nodes-chart.js +++ b/client/app/scripts/charts/nodes-chart.js @@ -12,8 +12,7 @@ import { MIN_NODE_SIZE, DETAILS_PANEL_WIDTH, MAX_NODE_SIZE } from '../constants/ import Logo from '../components/logo'; import { doLayout } from './nodes-layout'; import NodesChartElements from './nodes-chart-elements'; -import { getActiveTopologyOptions, getAdjacentNodes, - isSameTopology } from '../utils/topology-utils'; +import { getActiveTopologyOptions, getAdjacentNodes } from '../utils/topology-utils'; const log = debug('scope:nodes-chart'); @@ -82,8 +81,7 @@ class NodesChart extends React.Component { state.height = nextProps.forceRelayout ? nextProps.height : (state.height || nextProps.height); state.width = nextProps.forceRelayout ? nextProps.width : (state.width || nextProps.width); - // _.assign(state, this.updateGraphState(nextProps, state)); - if (nextProps.forceRelayout || !isSameTopology(nextProps.nodes, this.props.nodes)) { + if (nextProps.forceRelayout || nextProps.nodes !== this.props.nodes) { _.assign(state, this.updateGraphState(nextProps, state)); } diff --git a/client/app/scripts/utils/topology-utils.js b/client/app/scripts/utils/topology-utils.js index ae22afaba..3e90c6e36 100644 --- a/client/app/scripts/utils/topology-utils.js +++ b/client/app/scripts/utils/topology-utils.js @@ -171,13 +171,6 @@ export function getCurrentTopologyUrl(state) { return state.getIn(['currentTopology', 'url']); } -export function isSameTopology(nodes, nextNodes) { - const mapper = node => makeMap({id: node.get('id'), adjacency: node.get('adjacency')}); - const topology = nodes.map(mapper); - const nextTopology = nextNodes.map(mapper); - return isDeepEqual(topology, nextTopology); -} - export function isNodeMatchingQuery(node, query) { return node.get('label').includes(query) || node.get('subLabel').includes(query); }