@progress/kendo-angular-gantt
Version:
Kendo UI Angular Gantt
38 lines (37 loc) • 1.7 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import * as i0 from "@angular/core";
/**
* @hidden
*
* Notifies the timeline-scroll.directive to scroll into view to requested coordinates.
* The scrolling is performed based on client (viewport) coordinates.
*/
export class TimelineScrollService {
horizontalScroll = new Subject();
verticalScroll = new Subject();
scrollCancel = new Subject();
ngOnDestroy() {
this.horizontalScroll.complete();
this.verticalScroll.complete();
this.scrollCancel.complete();
}
requestHorizontalScroll(clientTop) {
this.horizontalScroll.next(clientTop);
}
requestVerticalScroll(clientLeft) {
this.verticalScroll.next(clientLeft);
}
requestScrollCancel() {
this.scrollCancel.next(undefined);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineScrollService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineScrollService });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TimelineScrollService, decorators: [{
type: Injectable
}] });