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

Method _toggleNativeDragInteractions

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

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

()

Source from the content-addressed store, hash-verified

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