Merge branch 'enhance-connection-more' of github.com:xyflow/xyflow into enhance-connection-more
This commit is contained in:
@@ -2,12 +2,13 @@ import { shallow } from 'zustand/shallow';
|
||||
|
||||
import { useStore } from './useStore';
|
||||
import type { ReactFlowStore } from '../types/store';
|
||||
import { ConnectionState } from '@xyflow/system';
|
||||
|
||||
const selector = (s: ReactFlowStore) => ({
|
||||
...s.connection,
|
||||
});
|
||||
import { ConnectionState, pointToRendererPoint } from '@xyflow/system';
|
||||
|
||||
const selector = (s: ReactFlowStore): ConnectionState => {
|
||||
return s.connection.inProgress
|
||||
? { ...s.connection, to: pointToRendererPoint(s.connection.to, s.transform) }
|
||||
: { ...s.connection };
|
||||
};
|
||||
/**
|
||||
* Hook for accessing the connection state.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user