Skip to content

Commit

Permalink
refactor(wrapnode): only add resize oberver once
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Oct 25, 2019
1 parent 36ad893 commit 4986ba7
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Nodes/wrapNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
const nodeElement = useRef<HTMLDivElement>(null);
const [offset, setOffset] = useState({ x: 0, y: 0 });
const [isDragging, setDragging] = useState(false);

const position = { x: xPos, y: yPos };
const nodeClasses = cx('react-flow__node', { selected });
const nodeStyle = {
Expand Down Expand Up @@ -184,7 +183,7 @@ export default (NodeComponent: ComponentType<NodeComponentProps>) => {
}

return;
}, [nodeElement.current]);
}, []);

return (
<DraggableCore
Expand Down

0 comments on commit 4986ba7

Please sign in to comment.