From c591396c34cafbef9d6802277d6358a330730cfc Mon Sep 17 00:00:00 2001 From: Andrew Levans <121060410+ALevansSamsung@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:43:28 -0500 Subject: [PATCH] Issue/#52 (#45) * Revert "Merge pull request #10 from eclipsesource/issues/52-cursor-overview-offset" This reverts commit 23be40c2751424e7f8380332634203919ddc91b0, reversing changes made to 3a2a62af4fb08e9e538bc2215fafbfdf358e1311. * Only Offset Overview Cursor Selection When Sidebar Cursor in overview is offset by Sidebar Width even when Sidebar is minimized Change-Id: Id6c1affc8fbb8a1a15f1d98eb82028b24d4a1b38 --- ui/src/frontend/overview_timeline_panel.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ui/src/frontend/overview_timeline_panel.ts b/ui/src/frontend/overview_timeline_panel.ts index 45d7a83b9d..3bb7bd55ff 100644 --- a/ui/src/frontend/overview_timeline_panel.ts +++ b/ui/src/frontend/overview_timeline_panel.ts @@ -23,7 +23,6 @@ import { import { OVERVIEW_TIMELINE_NON_VISIBLE_COLOR, - SIDEBAR_WIDTH, TRACK_SHELL_WIDTH, getCssStr, } from './css_constants'; @@ -173,20 +172,17 @@ export class OverviewTimelinePanel extends Panel { if (this.gesture === undefined || this.gesture.isDragging) { return; } - (e.target as HTMLElement).style.cursor = this.chooseCursor(e.x); + (e.target as HTMLElement).style.cursor = this.chooseCursor(e.offsetX); } private chooseCursor(x: number) { if (this.timeScale === undefined) return 'default'; - const [vizStartPx, vizEndPx] = + const [startBound, endBound] = OverviewTimelinePanel.extractBounds(this.timeScale); - const offset = globals.hideSidebar ? 0 : SIDEBAR_WIDTH; - const startBound = vizStartPx - 1 + offset; - const endBound = vizEndPx + offset; if (OverviewTimelinePanel.inBorderRange(x, startBound) || OverviewTimelinePanel.inBorderRange(x, endBound)) { return 'ew-resize'; - } else if (x < offset + TRACK_SHELL_WIDTH) { + } else if (x < TRACK_SHELL_WIDTH) { return 'default'; } else if (x < startBound || endBound < x) { return 'crosshair';