From 1814ecfc278600fe6dd39cc2c906e4e87e1b801f Mon Sep 17 00:00:00 2001 From: Adam Kariv Date: Wed, 24 Jan 2024 12:54:05 +0200 Subject: [PATCH] disable mouse wheel for zooming in directory mode --- projects/chronomaps/src/app/time-line/time-line.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/chronomaps/src/app/time-line/time-line.component.ts b/projects/chronomaps/src/app/time-line/time-line.component.ts index bcc9f8c..b0c0ee7 100644 --- a/projects/chronomaps/src/app/time-line/time-line.component.ts +++ b/projects/chronomaps/src/app/time-line/time-line.component.ts @@ -154,7 +154,8 @@ export class TimeLineComponent implements OnInit, OnChanges, AfterViewInit { .append('svg') .attr('width', '100%') .attr('height', '100%') - .call(this.zoomBehaviour); + .call(this.zoomBehaviour) + .call((selection) => this.hoverable ? selection : selection.on('wheel.zoom', null)); this.svg.append('rect') .attr('transform', `translate(0, ${this.HEIGHT - this.TEXT_HEIGHT})`) .attr('width', this.WIDTH)