MCPcopy Create free account
hub / github.com/angular/components / _toggleNativeDragInteractions

Method _toggleNativeDragInteractions

src/cdk/drag-drop/drag-ref.ts:1366–1377  ·  view source on GitHub ↗

Toggles the native drag interactions, based on how many handles are registered.

()

Source from the content-addressed store, hash-verified

1364
1365 /** Toggles the native drag interactions, based on how many handles are registered. */
1366 private _toggleNativeDragInteractions() {
1367 if (!this._rootElement || !this._handles) {
1368 return;
1369 }
1370
1371 const shouldEnable = this._handles.length > 0 || !this.isDragging();
1372
1373 if (shouldEnable !== this._nativeInteractionsEnabled) {
1374 this._nativeInteractionsEnabled = shouldEnable;
1375 toggleNativeDragInteractions(this._rootElement, shouldEnable);
1376 }
1377 }
1378
1379 /** Removes the manually-added event listeners from the root element. */
1380 private _removeRootElementListeners() {

Callers 4

disabledMethod · 0.95
withHandlesMethod · 0.95
_endDragSequenceMethod · 0.95
_startDragSequenceMethod · 0.95

Calls 2

isDraggingMethod · 0.95

Tested by

no test coverage detected