mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
perf(range): generates inefficient JS
This commit is contained in:
@ -579,17 +579,18 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
updateTicks() {
|
updateTicks() {
|
||||||
if (this._snaps && this._ticks) {
|
const ticks = this._ticks;
|
||||||
let ratio = this.ratio;
|
if (this._snaps && ticks) {
|
||||||
|
var ratio = this.ratio;
|
||||||
if (this._dual) {
|
if (this._dual) {
|
||||||
let upperRatio = this.ratioUpper;
|
var upperRatio = this.ratioUpper;
|
||||||
|
|
||||||
this._ticks.forEach(t => {
|
ticks.forEach(t => {
|
||||||
t.active = (t.ratio >= ratio && t.ratio <= upperRatio);
|
t.active = (t.ratio >= ratio && t.ratio <= upperRatio);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this._ticks.forEach(t => {
|
ticks.forEach(t => {
|
||||||
t.active = (t.ratio <= ratio);
|
t.active = (t.ratio <= ratio);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user