@devexperts/dxcharts-lite
Version:
23 lines (22 loc) • 1.19 kB
JavaScript
/*
* 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 { defaultDragComponentOptions, DragNDropComponent, } from './drag-n-drop.component';
export class DragNDropYComponent extends DragNDropComponent {
constructor(hitTest, dragCallbacks, canvasInputListener, chartPanComponent, dragComponentOptions = defaultDragComponentOptions) {
super(hitTest, dragCallbacks, canvasInputListener, chartPanComponent, dragComponentOptions);
}
/**
* This method activates the component and adds subscriptions to the canvasInputListener.
* @protected
* @returns {void}
*/
doActivate() {
super.doActivate();
this.addRxSubscription(this.canvasInputListener.observeYDragStart(this.hitTest).subscribe(this.onDragStart));
this.addRxSubscription(this.canvasInputListener.observeYDrag().subscribe(this.onDragTick));
this.addRxSubscription(this.canvasInputListener.observeYDragEnd().subscribe(this.onDragEnd));
}
}