UNPKG

@devexperts/dxcharts-lite

Version:
49 lines (48 loc) 2.28 kB
/* * Copyright (C) 2019 - 2025 Devexperts Solutions IE Limited * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import { ChartBaseElement } from '../../model/chart-base-element'; import { CanvasBoundsContainer, HitBoundsTest } from '../../canvas/canvas-bounds-container'; import { CanvasInputListenerComponent } from '../../inputlisteners/canvas-input-listener.component'; import { ScaleModel } from '../../model/scale.model'; import { Pixel, Unit } from '../../model/scaling/viewport.model'; import { ChartModel } from '../chart/chart.model'; import { ChartPanComponent } from '../pan/chart-pan.component'; import { HitTestCanvasModel } from '../../model/hit-test-canvas.model'; /** * Handles the mouse drag on X axis - to zoom the viewport horizontally. * @doc-tags scaling,zoom,viewport */ export declare class XAxisScaleHandler extends ChartBaseElement { private scale; private canvasInputListener; private canvasBoundsContainer; private chartPanComponent; private chartModel; private hitTest; private hitTestCanvasModel; lastXStart: Unit; lastXEnd: Unit; lastXWidth: Unit; lastXPxWidth: Pixel; private dblClickCallback; private touches; private dblTapCallback; constructor(scale: ScaleModel, canvasInputListener: CanvasInputListenerComponent, canvasBoundsContainer: CanvasBoundsContainer, chartPanComponent: ChartPanComponent, chartModel: ChartModel, hitTest: HitBoundsTest, hitTestCanvasModel: HitTestCanvasModel); /** * This method is used to activate the canvas input listener and add a subscription to it. * It calls the parent class's doActivate method and then subscribes to the canvasInputListener's observeDbClick method. * The subscription is added to the RxJS subscription list. * When the subscription is triggered, the doBasicScale method is called. * @protected * @returns {void} */ protected doActivate(): void; private onXDragStart; private onXDragTick; private onXDragEnd; setDblTapCallback: (cb: () => void) => () => void; setDblClickCallback: (cb: () => void) => () => void; }