Skip to content

Commit

Permalink
upd: 更新可拖拽区域选取逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
shuxiaokai3 committed Jul 19, 2023
1 parent 6a286df commit 58038d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export function changeNodeStateWhenMouseDown(e: MouseEvent): void {
nodesStore.changeNodeStyleInfoById(maxZIndexNode.id, {
dragZIndex: configStore.dragNodeZIndex,
});
if (nodeStateStore.isMouseHoverDragArea) {
nodeStateStore.$patch({
isMouseDownDragArea: true
});
}
}
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export function changeNodeWhenMouseMove(e: MouseEvent): void {
const nodesStore = useFlowNodesStore();
const lineStateStore = useFlowLineStateStore();
const configStore = useFlowConfigStore();
if (!nodeStateStore.isMouseHoverDragArea || !nodeStateStore.isMouseDown || resizeNodeDotStateStore.isMouseDown || lineStateStore.isHoverDragArrow || createLineStateStore.isMouseDown) {
if (!nodeStateStore.isMouseDownDragArea || !nodeStateStore.isMouseDown || resizeNodeDotStateStore.isMouseDown || lineStateStore.isHoverDragArrow || createLineStateStore.isMouseDown) {
return
}
const matchedNode = nodesStore.nodeList.find(node => node.id === nodeStateStore.dragNodeId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export function changeStateWhenMouseUp(): void {
})
nodeStateStore.$patch({
isMouseDown: false,
isMouseDownDragArea: false,
dragNodeId: '',
isMove: false,
})
Expand Down

0 comments on commit 58038d5

Please sign in to comment.