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

Method _updateTickMarkTrackUI

src/material/slider/slider.ts:788–797  ·  view source on GitHub ↗

Updates the width of the tick mark track.

()

Source from the content-addressed store, hash-verified

786
787 /** Updates the width of the tick mark track. */
788 private _updateTickMarkTrackUI(): void {
789 if (!this.showTickMarks || this._skipUpdate()) {
790 return;
791 }
792
793 const step = this._step && this._step > 0 ? this._step : 1;
794 const maxValue = Math.floor(this.max / step) * step;
795 const percentage = (maxValue - this.min) / (this.max - this.min);
796 this._tickMarkTrackWidth = (this._cachedWidth - 6) * percentage;
797 }
798
799 // Track active update conditions
800 //

Callers 4

showTickMarksMethod · 0.95
ngAfterViewInitMethod · 0.95
_onMinMaxOrStepChangeMethod · 0.95
_onResizeMethod · 0.95

Calls 1

_skipUpdateMethod · 0.95

Tested by

no test coverage detected