Skip to content

Commit

Permalink
dirty fix for issue html-next#296
Browse files Browse the repository at this point in the history
  • Loading branch information
wozny1989 committed Jul 25, 2023
1 parent fd92851 commit faf95dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions addon/-private/data-view/radar/dynamic-radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class DynamicRadar extends Radar {
// completely new set of items and won't get an accurate measurement until after they render the
// first time.
if (_didReset === false) {
this._measure();
// this._measure();
}

const { values } = skipList;
Expand Down Expand Up @@ -142,9 +142,9 @@ export default class DynamicRadar extends Radar {
// (the delta). We want to measure the delta of exactly this number of items, because
// items that are after the first visible item should not affect the scroll position,
// and neither should items already rendered before the first visible item.
const measureLimit = Math.min(Math.abs(firstItemIndex - _prevFirstItemIndex), _prevFirstVisibleIndex - firstItemIndex);
// const measureLimit = Math.min(Math.abs(firstItemIndex - _prevFirstItemIndex), _prevFirstVisibleIndex - firstItemIndex);

beforeVisibleDiff = Math.round(this._measure(measureLimit));
// beforeVisibleDiff = Math.round(this._measure(measureLimit));
}

return beforeVisibleDiff + super._calculateScrollDiff();
Expand Down
8 changes: 4 additions & 4 deletions addon/-private/data-view/skip-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ export default class SkipList {
}

set(index, value) {
assert('value must be a number', typeof value === 'number');
assert('value must non-negative', value >= 0);
assert('index must be a number', typeof index === 'number');
assert('index must be within bounds', index >= 0 && index < this.values.length);
assert('value must be a number', typeof value === 'number');
// assert('value must non-negative', value >= 0);
assert('index must be a number', typeof index === 'number');
assert('index must be within bounds', index >= 0 && index < this.values.length);

const { layers } = this;
const oldValue = layers[layers.length - 1][index];
Expand Down

0 comments on commit faf95dd

Please sign in to comment.