Skip to content

Commit

Permalink
Use const enums to reduce generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
masimplo committed Sep 20, 2017
1 parent 564ef41 commit 6eaf7d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/virtual-scroll/virtual-scroll.ts
Expand Up @@ -547,7 +547,6 @@ export class VirtualScroll implements DoCheck, OnChanges, AfterContentInit, OnDe
}

adjustRendered(cells, data);
console.debug('virtual-scroll', 'populateData inside renderVirtual');
this._zone.run(() => {
populateNodeData(
data.topCell, data.bottomCell,
Expand Down Expand Up @@ -685,7 +684,6 @@ export class VirtualScroll implements DoCheck, OnChanges, AfterContentInit, OnDe
updateDimensions(this._plt, nodes, cells, data, false);

adjustRendered(cells, data);
console.debug('virtual-scroll', 'populateData inside hasNoChanges');
var hasChanges = populateNodeData(
data.topCell, data.bottomCell,
diff > 0,
Expand Down Expand Up @@ -825,7 +823,7 @@ export class VirtualScroll implements DoCheck, OnChanges, AfterContentInit, OnDe

const SCROLL_DIFFERENCE_MINIMUM = 40;

enum ScrollQueue {
const enum ScrollQueue {
NoChanges = 1,
ChangeDetection = 2,
DomWrite = 3
Expand Down
2 changes: 1 addition & 1 deletion src/components/virtual-scroll/virtual-util.ts
Expand Up @@ -701,7 +701,7 @@ export interface VirtualData {
ftrHeight?: number;
}

enum TemplateType {
const enum TemplateType {
Item = 0,
Header = 1,
Footer = 2
Expand Down

0 comments on commit 6eaf7d1

Please sign in to comment.