fix(web): left port not support add node

This commit is contained in:
zhaoying
2026-05-06 14:32:55 +08:00
parent 6b68ee9fc8
commit 577f443459
3 changed files with 12 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
* @Author: ZhaoYing
* @Date: 2026-02-03 15:17:48
* @Last Modified by: ZhaoYing
* @Last Modified time: 2026-04-28 13:49:11
* @Last Modified time: 2026-05-06 14:30:46
*/
import { Clipboard, Graph, Keyboard, MiniMap, Node, Snapline, History, type Edge } from '@antv/x6';
import { register } from '@antv/x6-react-shape';
@@ -990,6 +990,12 @@ export const useWorkflowGraph = ({
e.preventDefault();
const portElement = e.target as HTMLElement;
const rect = portElement.getBoundingClientRect();
const clickPort = node.getPorts().find(p => p.id === port)
const portGroup = clickPort?.group
if (portGroup === 'left') {
return
}
// Create temporary popover trigger element
const tempDiv = document.createElement('div');