diff --git a/src/components/pivot/moving-pivot.vue b/src/components/pivot/moving-pivot.vue index 39ef005..d37d088 100644 --- a/src/components/pivot/moving-pivot.vue +++ b/src/components/pivot/moving-pivot.vue @@ -63,22 +63,20 @@ function onMousemove(event) { MovingPivot.label = formatTime(currentT, timescale); MovingPivot.left = time2cursorX(currentT); - const pivot = UserPivots.get(currentT); - if (pivot !== undefined) { - MovingPivot.show = false; - MovingPivot.currentTakenPivot = pivot; - return; - } + // const pivot = UserPivots.get(currentT); + // if (pivot !== undefined) { + // MovingPivot.show = false; + // MovingPivot.currentTakenPivot = pivot; + // return; + // } + - if (MovingPivot.currentTakenPivot !== undefined) { - return; - } // 通过计算距离最近的用户信标,来决定是否要消失,给与用户信标空间来执行额外操作 const userPivot = getNearestUserPivot(currentT); if (userPivot) { const marginX = Math.abs(x - userPivot.x); - if (marginX < 25) { + if (marginX < 12) { // 此时距离用户信标比较近,隐藏主信标 MovingPivot.show = false; MovingPivot.currentTakenPivot = userPivot; diff --git a/src/components/pivot/named-axis-item.vue b/src/components/pivot/named-axis-item.vue index 450ea4d..45700cb 100644 --- a/src/components/pivot/named-axis-item.vue +++ b/src/components/pivot/named-axis-item.vue @@ -39,7 +39,6 @@ const containerStyle = computed(() => ({ const itemStyle = computed(() => ({ left: getPivot().left - boxShift + 'px', - })); function getPivot() { diff --git a/src/components/sidebar/handle-contextmenu.js b/src/components/sidebar/handle-contextmenu.js index fd5f1f6..c4bd156 100644 --- a/src/components/sidebar/handle-contextmenu.js +++ b/src/components/sidebar/handle-contextmenu.js @@ -2,6 +2,7 @@ import { globalLookup } from "@/hook/global"; import { computed, nextTick, reactive } from "vue"; import { updateColorPickerManage } from "./color-picker"; import { WaveContainerView } from "@/hook/wave-container-view"; +import { sidebarSelectedWires } from "@/hook/sidebar-select-wire"; /** * @namespace contextmenu @@ -249,6 +250,21 @@ export function deleteSignalByView() { const signal = contextmenu.currentWire; if (signal) { WaveContainerView.delete(signal); + sidebarSelectedWires.delete(signal.link); + } + + contextmenu.show = false; +} + + +export function deleteAllSelectedSignals() { + + for (const link of globalLookup.sidebarSelectedWireLinks) { + const signal = globalLookup.link2CurrentWires.get(link); + if (signal) { + WaveContainerView.delete(signal); + sidebarSelectedWires.delete(link); + } } contextmenu.show = false; diff --git a/src/components/sidebar/signal-context-menu.vue b/src/components/sidebar/signal-context-menu.vue index b856b66..adea587 100644 --- a/src/components/sidebar/signal-context-menu.vue +++ b/src/components/sidebar/signal-context-menu.vue @@ -8,6 +8,13 @@ {{ t('context-menu.delete') }} +