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

Function toggleNativeDragInteractions

src/cdk/drag-drop/dom/styling.ts:50–62  ·  view source on GitHub ↗
(element: HTMLElement, enable: boolean)

Source from the content-addressed store, hash-verified

48 * @docs-private
49 */
50export function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {
51 const userSelect = enable ? '' : 'none';
52
53 extendStyles(element.style, {
54 'touch-action': enable ? '' : 'none',
55 '-webkit-user-drag': enable ? '' : 'none',
56 '-webkit-tap-highlight-color': enable ? '' : 'transparent',
57 'user-select': userSelect,
58 '-ms-user-select': userSelect,
59 '-webkit-user-select': userSelect,
60 '-moz-user-select': userSelect,
61 });
62}
63
64/**
65 * Toggles whether an element is visible while preserving its dimensions.

Callers 6

disabledMethod · 0.90
withHandlesMethod · 0.90
disableHandleMethod · 0.90
enableHandleMethod · 0.90
_createPreviewMethod · 0.90

Calls 1

extendStylesFunction · 0.70

Tested by

no test coverage detected