@angular/material 17.0.2 → 17.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -861,8 +861,8 @@ class MatSlider extends _MatSliderMixinBase {
861
861
  }
862
862
  _updateTickMarkUINonRange(step) {
863
863
  const value = this._getValue();
864
- let numActive = Math.max(Math.round((value - this.min) / step), 0);
865
- let numInactive = Math.max(Math.round((this.max - value) / step), 0);
864
+ let numActive = Math.max(Math.floor((value - this.min) / step), 0);
865
+ let numInactive = Math.max(Math.floor((this.max - value) / step), 0);
866
866
  this._isRtl ? numActive++ : numInactive++;
867
867
  this._tickMarks = Array(numActive)
868
868
  .fill(0 /* _MatTickMark.ACTIVE */)
@@ -1335,7 +1335,8 @@ class MatSliderThumb {
1335
1335
  if (this._slider._isRtl) {
1336
1336
  return (1 - this.percentage) * this._slider._cachedWidth;
1337
1337
  }
1338
- return this.percentage * this._slider._cachedWidth;
1338
+ const tickMarkOffset = 3; // The spaces before & after the start & end tick marks.
1339
+ return this.percentage * (this._slider._cachedWidth - tickMarkOffset * 2) + tickMarkOffset;
1339
1340
  }
1340
1341
  _calcTranslateXByPointerEvent(event) {
1341
1342
  return event.clientX - this._slider._cachedLeft;