UNPKG

scichart

Version:

Fast WebGL JavaScript Charting Library and Framework

83 lines (82 loc) 3.83 kB
import { EChart2DModifierType } from "../../../types/ChartModifierType"; import { EModifierType } from "../../../types/ModifierType"; import { ModifierMouseArgs } from "../ModifierMouseArgs"; import { IPinchZoomModifierOptions, PinchZoomModifier } from "../PinchZoomModifier"; export declare enum EPolarPanModifierPanMode { PolarStartAngle = "PolarStartAngle", PolarVisibleRange = "PolarVisibleRange", Cartesian = "Cartesian" } /** * Options for passing to the constructor of {@link PolarPanModifier} derived types */ export interface IPolarPanModifierOptions extends IPinchZoomModifierOptions { /** The pan mode to use with primary action {@link executeCondition} */ primaryPanMode?: EPolarPanModifierPanMode; /** The pan mode to use with secondary action {@link secondaryExecuteCondition} */ secondaryPanMode?: EPolarPanModifierPanMode; /** The multiplier which applies to sensitivity of panning. Should be greater than 0 */ growFactor?: number; /** If True uses length scale zoom on the radial axis, otherwise uses visible range zoom. Default True */ zoomSize?: boolean; } /** * The PolarPanModifier provides drag to pan behavior on a 2D {@link SciChartPolarSurface} * as well as pinch zoom behavior on touchscreen devices * within SciChart - High Performance {@link https://www.scichart.com/javascript-chart-features | JavaScript Charts} * @remarks * * To apply the PolarPanModifier to a {@link SciChartPolarSurface} and add drag to pan behavior, * use the following code: * * ```ts * const sciChartSurface: SciChartPolarSurface; * sciChartSurface.chartModifiers.add(new PolarPanModifier()); * ``` * * --- * 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-modifier-api/polar-modifiers/polar-pan-modifier/} */ export declare class PolarPanModifier extends PinchZoomModifier { readonly type: EChart2DModifierType; /** The pan mode to use with primary action {@link executeCondition} */ primaryPanMode: EPolarPanModifierPanMode; /** The pan mode to use with secondary action {@link secondaryExecuteCondition} */ secondaryPanMode: EPolarPanModifierPanMode; /** The multiplier which applies to sensitivity of panning. Should be greater than 0 */ growFactor: number; /** If True uses length scale zoom on the radial axis, otherwise uses visible range zoom. Default True */ zoomSize: boolean; private panMode; /** * Creates an instance of a PolarPanModifier * @param options optional parameters to pass to the PolarPanModifier to configure it upon construction * * --- * 📚 Docs: {@link https://www.scichart.com/documentation/js/v4/2d-charts/chart-modifier-api/polar-modifiers/polar-pan-modifier/} */ constructor(options?: IPolarPanModifierOptions); /** @inheritDoc */ get modifierType(): EModifierType; /** @inheritDoc */ modifierMouseDown(args: ModifierMouseArgs): void; /** @inheritDoc */ modifierMouseMove(args: ModifierMouseArgs): void; /** @inheritDoc */ modifierPointerCancel(args: ModifierMouseArgs): void; /** @inheritDoc */ modifierMouseUp(args: ModifierMouseArgs): void; /** @inheritDoc */ toJSON(): { type: string; options: Required<Omit<import("../ChartModifierBase2D").IChartModifierBaseOptions, never>>; }; protected getIsActionAllowed(args: ModifierMouseArgs): boolean; private performCartesianPan; /** * Performs polar pan * @param isStartAngleMode If True uses the start angle pan on X axis, if False the visible range pan * @param isLengthScaleZoom If True uses the length scale zoom on Y axis, if False the visible range zoom */ private performPolarPan; }