source: trip-planner-front/node_modules/@angular/cdk/drag-drop/drag-drop-registry.d.ts@ 59329aa

Last change on this file since 59329aa was 59329aa, checked in by Ema <ema_spirova@…>, 3 years ago

adding photos

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { NgZone, OnDestroy } from '@angular/core';
9import { Observable, Subject } from 'rxjs';
10/**
11 * Service that keeps track of all the drag item and drop container
12 * instances, and manages global event listeners on the `document`.
13 * @docs-private
14 */
15export declare class DragDropRegistry<I extends {
16 isDragging(): boolean;
17}, C> implements OnDestroy {
18 private _ngZone;
19 private _document;
20 /** Registered drop container instances. */
21 private _dropInstances;
22 /** Registered drag item instances. */
23 private _dragInstances;
24 /** Drag item instances that are currently being dragged. */
25 private _activeDragInstances;
26 /** Keeps track of the event listeners that we've bound to the `document`. */
27 private _globalListeners;
28 /**
29 * Predicate function to check if an item is being dragged. Moved out into a property,
30 * because it'll be called a lot and we don't want to create a new function every time.
31 */
32 private _draggingPredicate;
33 /**
34 * Emits the `touchmove` or `mousemove` events that are dispatched
35 * while the user is dragging a drag item instance.
36 */
37 readonly pointerMove: Subject<TouchEvent | MouseEvent>;
38 /**
39 * Emits the `touchend` or `mouseup` events that are dispatched
40 * while the user is dragging a drag item instance.
41 */
42 readonly pointerUp: Subject<TouchEvent | MouseEvent>;
43 /**
44 * Emits when the viewport has been scrolled while the user is dragging an item.
45 * @deprecated To be turned into a private member. Use the `scrolled` method instead.
46 * @breaking-change 13.0.0
47 */
48 readonly scroll: Subject<Event>;
49 constructor(_ngZone: NgZone, _document: any);
50 /** Adds a drop container to the registry. */
51 registerDropContainer(drop: C): void;
52 /** Adds a drag item instance to the registry. */
53 registerDragItem(drag: I): void;
54 /** Removes a drop container from the registry. */
55 removeDropContainer(drop: C): void;
56 /** Removes a drag item instance from the registry. */
57 removeDragItem(drag: I): void;
58 /**
59 * Starts the dragging sequence for a drag instance.
60 * @param drag Drag instance which is being dragged.
61 * @param event Event that initiated the dragging.
62 */
63 startDragging(drag: I, event: TouchEvent | MouseEvent): void;
64 /** Stops dragging a drag item instance. */
65 stopDragging(drag: I): void;
66 /** Gets whether a drag item instance is currently being dragged. */
67 isDragging(drag: I): boolean;
68 /**
69 * Gets a stream that will emit when any element on the page is scrolled while an item is being
70 * dragged.
71 * @param shadowRoot Optional shadow root that the current dragging sequence started from.
72 * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can
73 * be used to include an additional top-level listener at the shadow root level.
74 */
75 scrolled(shadowRoot?: DocumentOrShadowRoot | null): Observable<Event>;
76 ngOnDestroy(): void;
77 /**
78 * Event listener that will prevent the default browser action while the user is dragging.
79 * @param event Event whose default action should be prevented.
80 */
81 private _preventDefaultWhileDragging;
82 /** Event listener for `touchmove` that is bound even if no dragging is happening. */
83 private _persistentTouchmoveListener;
84 /** Clears out the global event listeners from the `document`. */
85 private _clearGlobalListeners;
86}
Note: See TracBrowser for help on using the repository browser.