nit: It would be clearer to have this line (`var range=...`) up a few lines to avoid repeating `this._ranges[this._selectedRangeIndex]`