From 8ac071cd1ed98e20574b2340e061c09b703d0232 Mon Sep 17 00:00:00 2001 From: Anton Vorobev Date: Thu, 5 Dec 2024 12:22:08 +0000 Subject: [PATCH] Pull request #5382: [DXCF-5697] [Adaptive] - When changing zoom on the Y axis, a menu pops up in adaptive mode // init Merge in DXCHARTS/dxchart5 from bugfix/DXCF-5697-adaptive-when-changing-zoom-on-the-y-axis-a-menu-pops-up-in-adaptive-mode to master * commit 'd353187ad89418389b71b1545b96f4ca8ace45f9': [DXCF-5697] [Adaptive] - When changing zoom on the Y axis, a menu pops up in adaptive mode // remove copyright header [DXCF-5697] [Adaptive] - When changing zoom on the Y axis, a menu pops up in adaptive mode // init GitOrigin-RevId: c91a6540107ab8d3f3f11f09e4821f94a2af3b39 --- src/chart/components/y_axis/y-axis-scale.handler.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/chart/components/y_axis/y-axis-scale.handler.ts b/src/chart/components/y_axis/y-axis-scale.handler.ts index d954988..8f68d2e 100644 --- a/src/chart/components/y_axis/y-axis-scale.handler.ts +++ b/src/chart/components/y_axis/y-axis-scale.handler.ts @@ -36,6 +36,8 @@ export class YAxisScaleHandler extends ChartBaseElement { lastYHeight: Unit = 0; lastYPxHeight: Pixel = 0; + private dragNDropYComponent: DragNDropYComponent | undefined; + private dblClickCallback: () => void; private touches: TouchList | undefined; @@ -73,7 +75,15 @@ export class YAxisScaleHandler extends ChartBaseElement { }, ); this.addChildEntity(dragNDropYComponent); + this.dragNDropYComponent = dragNDropYComponent; + } + } + + public isDragging(): boolean { + if (!this.dragNDropYComponent) { + return false; } + return Math.abs(this.dragNDropYComponent.draggedPixels) > 0; } protected doActivate(): void {