Skip to content

Commit

Permalink
Make debug logs consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
masimplo committed Sep 15, 2017
1 parent a716e58 commit 7d3b7c4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/virtual-scroll/virtual-scroll.ts
Expand Up @@ -458,13 +458,13 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {

// add new record after current position
if (pindex === null && (cindex < lastRecord)) {
console.debug('adding record before current position, slow path');
console.debug('virtual-scroll', 'adding record before current position, slow path');
needClean = true;
return;
}
// remove record after current position
if (pindex < lastRecord && cindex === null) {
console.debug('removing record before current position, slow path');
console.debug('virtual-scroll', 'removing record before current position, slow path');
needClean = true;
return;
}
Expand All @@ -484,23 +484,23 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
readUpdate(needClean: boolean) {
if (needClean) {
// reset everything
console.debug('virtual-scroll, readUpdate: slow path');
console.debug('virtual-scroll', 'readUpdate: slow path');
this._cells.length = 0;
this._nodes.length = 0;
this._itmTmp.viewContainer.clear();

// ******** DOM READ ****************
this.calcDimensions();
} else {
console.debug(`virtual-scroll, readUpdate: fast path`);
console.debug('virtual-scroll', 'readUpdate: fast path');
}
}

/**
* @hidden
*/
writeUpdate(needClean: boolean) {
console.debug('virtual-scroll, writeUpdate need clean:', needClean);
console.debug('virtual-scroll', 'writeUpdate need clean:', needClean);
const data = this._data;
const stopAtHeight = (data.scrollTop + data.renderHeight);
data.scrollDiff = SCROLL_DIFFERENCE_MINIMUM + 1;
Expand Down Expand Up @@ -610,7 +610,7 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
return;
}

console.debug('virtual-list: resized window');
console.debug('virtual-scroll', 'resized window');
this.calcDimensions();
this.writeUpdate(false);
}
Expand Down Expand Up @@ -779,7 +779,7 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
this._renderer.setElementStyle(this._elementRef.nativeElement, 'height', newVirtualHeight > 0 ? newVirtualHeight + 'px' : '');

this._vHeight = newVirtualHeight;
console.debug('VirtualScroll, height', newVirtualHeight);
console.debug('virtual-scroll', 'height', newVirtualHeight);
}
}

Expand Down

0 comments on commit 7d3b7c4

Please sign in to comment.