Skip to content

Commit

Permalink
remove timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnaLysiuk committed Jan 17, 2024
1 parent 2a1aa4f commit a0ad4db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,7 @@ export const LinesDiagram = React.forwardRef<
x: -nodeX * s + size.width / 2.0,
y: -nodeY * s + size.height / 2.0,
};
setTimeout(() => {
setTransform(transformTo.x, transformTo.y, s, 200, "easeOut");
}, 250);
setTransform(transformTo.x, transformTo.y, s, 200, "easeOut");
}
};

Expand Down
10 changes: 4 additions & 6 deletions packages/editor/src/state/containers/trees/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ const useTreesStateContainer = createContainer(() => {
.map((a) => a.name);
const nodesRelatedToActiveInterface =
activeNode &&
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
activeNode.data.type === TypeDefinition.InterfaceTypeDefinition
? allNodes.nodes
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
.filter((node) => node.interfaces.includes(activeNode.name))
.map((a) => a.name)
: [];
const notBaseTypes = activeNode?.args
.map((a) => getTypeName(a.type.fieldType))
Expand Down Expand Up @@ -242,9 +242,7 @@ const useTreesStateContainer = createContainer(() => {
nodeId !== selectedNodeId?.value?.id ||
_selectedNodeId?.justCreated !== selectedNodeId?.justCreated
) {
setTimeout(() => {
return _setSelectedNodeId(_selectedNodeId);
}, 250);
_setSelectedNodeId(_selectedNodeId);
}
},
[_setSelectedNodeId, allNodes, selectedNodeId?.value?.id, focusMode]
Expand Down

0 comments on commit a0ad4db

Please sign in to comment.