feat(annotation): 优化标注编辑与交互体验
All checks were successful
Package component / package (push) Successful in 4m23s

标注编辑器支持时间输入与采样点吸附,完善标注交互、默认配色和示例图框样式。
This commit is contained in:
李启源
2026-08-17 12:16:12 +08:00
parent 3692e21dbc
commit dda87f7508
21 changed files with 597 additions and 215 deletions

View File

@@ -87,9 +87,11 @@ const {
contextMenu,
editorSeries,
editorSeriesOptions,
timeError,
confirmAnnotation,
cancelAnnotation,
changeDraftSeries,
changeDraftTime,
editContextAnnotation,
deleteContextAnnotation,
chartHeight,
@@ -98,6 +100,11 @@ const {
setTitleMeasureElement,
setSharedOverlayElement,
} = toRefs(props.controller)
function handleChartPointerLeave() {
pointerInsideChart.value = false
handlePointerLeave.value()
}
</script>
<template>
@@ -123,7 +130,7 @@ const {
:data-plot-margin-bottom="resolvedPlotMargin.bottom"
:data-title-area-height="titleAreaHeight"
@pointerenter="pointerInsideChart = true"
@pointerleave="pointerInsideChart = false"
@pointerleave="handleChartPointerLeave"
@contextmenu.capture="handleNativeContextMenu"
>
<div
@@ -332,9 +339,11 @@ const {
:series="editorSeries"
:series-options="editorSeriesOptions"
:time-unit="timeUnit"
:time-error="timeError"
@confirm="confirmAnnotation"
@cancel="cancelAnnotation"
@series-change="changeDraftSeries"
@time-change="changeDraftTime"
/>
<WaveformAnnotationContextMenu