fix(GraphCanvas): 调整样式结构并优化指针事件处理

This commit is contained in:
Wenjie Zhang 2025-09-04 01:47:09 +08:00
parent c7a8d0030c
commit 8adad7e51c

View File

@ -346,13 +346,20 @@ onUnmounted(() => {
defineExpose({ refreshGraph, fitView, fitCenter, getInstance, focusNode, clearFocus, setData: setGraphData })
</script>
<style lang="less" scoped>
<style lang="less">
.graph-canvas-container {
position: relative;
width: 100%;
height: 100%;
.graph-canvas {
width: 100%;
height: 100%;
}
.slots {
// 便穿
pointer-events: none;
position: absolute;
top: 0;
left: 0;
@ -361,20 +368,25 @@ defineExpose({ refreshGraph, fitView, fitCenter, getInstance, focusNode, clearFo
display: flex;
flex-direction: column;
z-index: 999;
.overlay {
width: 100%;
flex-shrink: 0;
flex-grow: 0;
pointer-events: auto;
&.top { top: 0; }
&.bottom { bottom: 0; }
}
.content {
// 穿
pointer-events: none;
flex: 1;
}
.content * {
pointer-events: none;
}
}
}
.graph-canvas {
width: 100%;
height: 100%;
}
.overlay {
width: 100%;
flex-shrink: 0;
flex-grow: 0;
}
.content {
flex: 1;
}
.top { top: 0; }
.bottom { bottom: 0; }
</style>