Skip to content

Commit

Permalink
remove performace impr
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaLysiuk committed Mar 6, 2024
1 parent c56b740 commit 361eab0
Showing 1 changed file with 1 addition and 8 deletions.
Expand Up @@ -99,8 +99,6 @@ export interface RelationInterface {
extensions: NumberNode[];
}

let lastTimestamp = 0;

export const LinesDiagram = React.forwardRef<
LinesDiagramApi,
LinesDiagramProps
Expand Down Expand Up @@ -246,12 +244,7 @@ export const LinesDiagram = React.forwardRef<
const size = wrapper.getBoundingClientRect();
changeZoomInTopBar(state.scale);
if (!size) return;
requestAnimationFrame((timeStamp) => {
const delta = timeStamp - lastTimestamp;
if (delta < 60) {
return;
}
lastTimestamp = timeStamp;
requestAnimationFrame(() => {
cullNodes(simulatedNodes, state, size);
if (props.fieldsOn) {
LoDNodes(state.scale);
Expand Down

0 comments on commit 361eab0

Please sign in to comment.