diff --git a/src/index.ts b/src/index.ts index 21ba9b0..046075b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -448,12 +448,23 @@ export class LinePod extends ChartwerkPod { this.crosshair.style('display', 'none'); } + isDoubleClickActive(): boolean + { + if (this.options.zoomEvents.mouse['doubleClick'] === undefined) { + return false; + } + return this.options.zoomEvents.mouse.doubleClick.isActive; + } + // methods below rewrite cores, (move more methods here) protected zoomOut(): void { // TODO: test to remove, seems its depricated if(this.isOutOfChart() === true) { return; } + if (!this.isDoubleClickActive()) { + return; + } // TODO: its not clear, why we use this orientation here. Mb its better to use separate option const orientation: BrushOrientation = this.options.zoomEvents.mouse.zoom.orientation; const xInterval = this.state.xValueRange[1] - this.state.xValueRange[0];