Mercurial > hg > ugly-duckling
comparison src/app/visualisations/vertical-scale.component.ts @ 403:40ea40ebc2b3
Have animation controlled by a prop, clearing up animation tasks when set to false. Wire up accordingly.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Fri, 02 Jun 2017 19:12:38 +0100 |
parents | a02e6ec4a9d2 |
children | 64ed45a0bad3 |
comparison
equal
deleted
inserted
replaced
402:f9d5006f76e1 | 403:40ea40ebc2b3 |
---|---|
18 export class VerticalScaleComponent implements AfterViewInit { | 18 export class VerticalScaleComponent implements AfterViewInit { |
19 | 19 |
20 @ContentChildren( | 20 @ContentChildren( |
21 VerticalScaleRenderer | 21 VerticalScaleRenderer |
22 ) bounded: QueryList<VerticalScaleRenderer>; | 22 ) bounded: QueryList<VerticalScaleRenderer>; |
23 protected cachedRanged: [number, number]; | 23 protected cachedRange: [number, number]; |
24 | 24 |
25 ngAfterViewInit(): void { | 25 ngAfterViewInit(): void { |
26 this.bounded.forEach(component => { | 26 this.bounded.forEach(component => { |
27 this.cachedRanged = component.range; | 27 this.cachedRange = component.range; |
28 if (this.cachedRanged) { | 28 if (this.cachedRange) { |
29 component.renderScale(this.cachedRanged); | 29 component.renderScale(this.cachedRange); |
30 } | 30 } |
31 }); | 31 }); |
32 } | 32 } |
33 } | 33 } |