Skip to content

Commit

Permalink
Pull request #5431: Bugfix/DXCF-5766 events conference calls hover ov…
Browse files Browse the repository at this point in the history
…er events rhombus notice that hover zone is shifted

Merge in DXCHARTS/dxchart5 from bugfix/DXCF-5766-events-conference-calls-hover-over-events-rhombus-notice-that-hover-zone-is-shifted to master

* commit '09e6b54d86b4f204a95515589620246b862e3b6c':
  [DXCF-5766] Events - Conference Calls - Hover over events rhombus, notice that hover zone is shifted to the right // copy
  [DXCF-5766] Events - Conference Calls - Hover over events rhombus, notice that hover zone is shifted to the right // init

GitOrigin-RevId: 31a899a35a607927f3fd281a2c8ee50845f1dc56
  • Loading branch information
Keelaro1 authored and dxcity committed Jan 13, 2025
1 parent 6bbc7c4 commit 5795634
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/chart/components/events/events-hit-test.drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ export class EventsHitTestDrawer implements Drawer {
const bounds = this.canvasBoundsContainer.getBounds(CanvasElement.EVENTS);
ctx.save();
this.model.events.forEach((event, idx) => {
const visible = this.config.components.events.eventsVisibility[event.type];
if (!visible) {
return;
}

const prevEvent = this.model.events[idx - 1];
const prevX =
prevEvent &&
Expand All @@ -53,7 +58,8 @@ export class EventsHitTestDrawer implements Drawer {
const hoverSize = (size + hoverExtendedAreaPixels) * 2;
if (prevX !== undefined) {
const prevSize = getEventSize(prevEvent);
const isIntersectsWithPrev = prevX + prevSize > x - hoverSize / 2;
const prevVisible = this.config.components.events.eventsVisibility[prevEvent.type];
const isIntersectsWithPrev = prevVisible && prevX + prevSize > x - hoverSize / 2;
if (isIntersectsWithPrev) {
const hoverSize = size * 2 + hoverExtendedAreaPixels;
ctx.fillRect(prevX + prevSize, bounds.y, hoverSize, bounds.height);
Expand Down

0 comments on commit 5795634

Please sign in to comment.