指示器的隐藏
This commit is contained in:
@@ -554,6 +554,16 @@ const onDragEnd = (eventData) => {
|
||||
isDragging.value = false
|
||||
currentDragId.value = null
|
||||
|
||||
// ✅ 添加:发送拖拽结束事件
|
||||
emitEvent(EVENT_TYPES.AREA_DRAG_END, {
|
||||
dragId: dragId || currentDragId.value,
|
||||
areaId: props.id,
|
||||
finalPosition: finalPosition,
|
||||
timestamp: Date.now()
|
||||
}, {
|
||||
source: { component: 'Area', areaId: props.id, dragId: dragId || currentDragId.value }
|
||||
})
|
||||
|
||||
// 发送位置更新事件
|
||||
emitEvent(EVENT_TYPES.AREA_POSITION_UPDATE, {
|
||||
dragId: dragId || currentDragId.value,
|
||||
@@ -561,7 +571,7 @@ const onDragEnd = (eventData) => {
|
||||
left: originalPosition.value.left,
|
||||
top: originalPosition.value.top
|
||||
}, {
|
||||
source: { component: 'Area', areaId: props.id, dragId: dragId || currentDragId.value }
|
||||
source: { component: 'Area', areaId: props.id, dragId: dragId || currentDragId.value }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -916,6 +926,16 @@ onUnmounted(() => {
|
||||
isUnmounted.value = true
|
||||
|
||||
// 清理拖拽和调整大小状态
|
||||
if (isDragging.value) {
|
||||
// ✅ 添加:发送拖拽取消事件
|
||||
emitEvent(EVENT_TYPES.AREA_DRAG_CANCEL, {
|
||||
dragId: currentDragId.value,
|
||||
areaId: props.id,
|
||||
timestamp: Date.now()
|
||||
}, {
|
||||
source: { component: 'Area', areaId: props.id, dragId: currentDragId.value }
|
||||
})
|
||||
}
|
||||
isDragging.value = false
|
||||
currentDragId.value = null
|
||||
isResizing.value = false
|
||||
|
||||
Reference in New Issue
Block a user