@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.
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/slider/slider-input.mjs +3 -2
- package/esm2022/slider/slider.mjs +3 -3
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/slider.mjs +4 -3
- package/fesm2022/slider.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
package/fesm2022/slider.mjs
CHANGED
|
@@ -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.
|
|
865
|
-
let numInactive = Math.max(Math.
|
|
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
|
-
|
|
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;
|