Skip to content

Commit

Permalink
Chore: Refactor remove function type usage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexIchenskiy committed Mar 14, 2024
1 parent 5432587 commit 558c552
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/models/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,15 @@ export class Graph<N extends INodeBase, E extends IEdgeBase> implements IGraph<N
const removedNodesData = this._removeNodes(nodeIds);
const removedEdgesData = this._removeEdges(edgeIds);

const removedData = {
nodeIds: dedupArrays(removedNodesData.nodeIds, removedEdgesData.nodeIds),
edgeIds: dedupArrays(removedNodesData.edgeIds, removedEdgesData.edgeIds),
};

this._applyEdgeOffsets();
this._applyStyle();

if (this._settings && this._settings.onRemoveData) {
const removedData: IGraphObjectsIds = {
nodeIds: dedupArrays(removedNodesData.nodeIds, removedEdgesData.nodeIds),
edgeIds: dedupArrays(removedNodesData.edgeIds, removedEdgesData.edgeIds),
};

this._settings.onRemoveData(removedData);
}
}
Expand Down

0 comments on commit 558c552

Please sign in to comment.