mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 18:35:58 +08:00
### What problem does this PR solve? feat: click on a blank area of the canvas to hide the form drawer #918 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
cf542e80b3
commit
a3f4258cfc
@ -62,6 +62,10 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
|
|||||||
[showDrawer],
|
[showDrawer],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const onPaneClick = useCallback(() => {
|
||||||
|
hideDrawer();
|
||||||
|
}, [hideDrawer]);
|
||||||
|
|
||||||
const { onDrop, onDragOver, setReactFlowInstance } = useHandleDrop();
|
const { onDrop, onDragOver, setReactFlowInstance } = useHandleDrop();
|
||||||
|
|
||||||
const { handleKeyUp } = useHandleKeyUp();
|
const { handleKeyUp } = useHandleKeyUp();
|
||||||
@ -101,6 +105,7 @@ function FlowCanvas({ chatDrawerVisible, hideChatDrawer }: IProps) {
|
|||||||
onDrop={onDrop}
|
onDrop={onDrop}
|
||||||
onDragOver={onDragOver}
|
onDragOver={onDragOver}
|
||||||
onNodeClick={onNodeClick}
|
onNodeClick={onNodeClick}
|
||||||
|
onPaneClick={onPaneClick}
|
||||||
onInit={setReactFlowInstance}
|
onInit={setReactFlowInstance}
|
||||||
onKeyUp={handleKeyUp}
|
onKeyUp={handleKeyUp}
|
||||||
onSelectionChange={onSelectionChange}
|
onSelectionChange={onSelectionChange}
|
||||||
|
@ -203,9 +203,9 @@ export const CategorizeAnchorPointPositions = [
|
|||||||
export const RestrictedUpstreamMap = {
|
export const RestrictedUpstreamMap = {
|
||||||
[Operator.Begin]: [],
|
[Operator.Begin]: [],
|
||||||
[Operator.Categorize]: [Operator.Begin, Operator.Categorize, Operator.Answer],
|
[Operator.Categorize]: [Operator.Begin, Operator.Categorize, Operator.Answer],
|
||||||
[Operator.Answer]: [],
|
[Operator.Answer]: [Operator.Begin, Operator.Answer, Operator.Message],
|
||||||
[Operator.Retrieval]: [],
|
[Operator.Retrieval]: [Operator.Begin, Operator.Relevant],
|
||||||
[Operator.Generate]: [],
|
[Operator.Generate]: [Operator.Begin],
|
||||||
[Operator.Message]: [
|
[Operator.Message]: [
|
||||||
Operator.Begin,
|
Operator.Begin,
|
||||||
Operator.Message,
|
Operator.Message,
|
||||||
@ -214,8 +214,14 @@ export const RestrictedUpstreamMap = {
|
|||||||
Operator.RewriteQuestion,
|
Operator.RewriteQuestion,
|
||||||
Operator.Categorize,
|
Operator.Categorize,
|
||||||
],
|
],
|
||||||
[Operator.Relevant]: [],
|
[Operator.Relevant]: [Operator.Begin, Operator.Answer],
|
||||||
[Operator.RewriteQuestion]: [],
|
[Operator.RewriteQuestion]: [
|
||||||
|
Operator.Begin,
|
||||||
|
Operator.Message,
|
||||||
|
Operator.Generate,
|
||||||
|
Operator.RewriteQuestion,
|
||||||
|
Operator.Categorize,
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NodeMap = {
|
export const NodeMap = {
|
||||||
|
@ -56,6 +56,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.templatesBox {
|
.templatesBox {
|
||||||
// max-height: 500px;
|
max-height: 70vh;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user