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

Function toggleVisibility

src/cdk/drag-drop/dom/styling.ts:71–86  ·  view source on GitHub ↗
(
  element: HTMLElement,
  enable: boolean,
  importantProperties?: Set<string>,
)

Source from the content-addressed store, hash-verified

69 * @docs-private
70 */
71export function toggleVisibility(
72 element: HTMLElement,
73 enable: boolean,
74 importantProperties?: Set<string>,
75) {
76 extendStyles(
77 element.style,
78 {
79 position: enable ? '' : 'fixed',
80 top: enable ? '' : '0',
81 opacity: enable ? '' : '0',
82 left: enable ? '' : '-999em',
83 },
84 importantProperties,
85 );
86}
87
88/**
89 * Combines a transform string with an optional other transform

Callers 2

_startDragSequenceMethod · 0.90
_cleanupDragArtifactsMethod · 0.90

Calls 1

extendStylesFunction · 0.70

Tested by

no test coverage detected