MCPcopy Index your code
hub / github.com/angular/components / _setPadding

Method _setPadding

src/cdk/tree/padding.ts:85–96  ·  view source on GitHub ↗
(forceChange = false)

Source from the content-addressed store, hash-verified

83 }
84
85 _setPadding(forceChange = false) {
86 const padding = this._paddingIndent();
87
88 if (padding !== this._currentPadding || forceChange) {
89 const element = this._element.nativeElement;
90 const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';
91 const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';
92 element.style[paddingProp] = padding || '';
93 element.style[resetProp] = '';
94 this._currentPadding = padding;
95 }
96 }
97
98 /**
99 * This has been extracted to a util because of TS 4 and VE.

Callers 3

constructorMethod · 0.95
_setLevelInputMethod · 0.95
_setIndentInputMethod · 0.95

Calls 1

_paddingIndentMethod · 0.95

Tested by

no test coverage detected