UNPKG

@progress/kendo-angular-gantt

Version:
83 lines (82 loc) 3.48 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { AfterViewInit, NgZone, OnDestroy, Renderer2 } from '@angular/core'; import { PopupService } from '@progress/kendo-angular-popup'; import { GanttComponent } from '../gantt.component'; import { MappingService } from '../common/mapping.service'; import { TimelineScrollService } from '../scrolling/timeline-scroll.service'; import * as i0 from "@angular/core"; /** * Enables creating new dependencies by dragging. * * ```html * <kendo-gantt kendoGanttDependencyDragCreate></kendo-gantt> * ``` * * @remarks * Applied to: {@link GanttComponent} */ export declare class DependencyDragCreateDirective implements AfterViewInit, OnDestroy { private gantt; private zone; private renderer; private mapper; private popupService; private timelineScrollService; /** * Shows the validation tooltip during drag operations. * * @default true */ displayValidationTooltip: boolean; private get container(); private get polyline(); private get popupContainer(); /** * Points to the drag clue where the dragging started (the FROM task). * Used to attach/detach classes to the target element and its task wrapper parent element. */ private fromTaskClue; /** * The drag start element coords will be the same through the enitre dragging session, so compute them on press and cache them. */ private polylineStartCoords; /** * Stored during dragging to be consumed by the container scroll subscription. * The scroll event doesn't expose the current pointer position, so it has to be stored separately. */ private currentPointerClientCoords; private scrollListenerDisposer; private dragPopup; private dragSubscriptions; constructor(gantt: GanttComponent, zone: NgZone, renderer: Renderer2, mapper: MappingService, popupService: PopupService, timelineScrollService: TimelineScrollService); ngAfterViewInit(): void; ngOnDestroy(): void; private subscribeDraggable; private unsubscribeDraggable; private handlePress; private handleDrag; private handleRelease; private updatePolyline; private clearPolyline; private assignDragStartClasses; private removeDragStartClasses; private scrollPointIntoView; private cancelScroll; private addScrollListener; private removeScrollListener; private openDragPopup; private updateDragPopup; private closeDragPopup; private extractTaskName; private getTooltipContext; /** * Restricts the popup position to not go below the scroll height or width of the container. * Flips the position of the popup when there's not enough vertical space in the visible part of the container to render the popup. */ private normalizePopupPosition; static ɵfac: i0.ɵɵFactoryDeclaration<DependencyDragCreateDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<DependencyDragCreateDirective, "[kendoGanttDependencyDragCreate]", never, { "displayValidationTooltip": { "alias": "displayValidationTooltip"; "required": false; }; }, {}, never, never, true, never>; }