Mercurial > hg > ugly-duckling
view src/app/visualisations/vertical-scale.component.ts @ 396:3eab26a629e1
Revert changes relating to bodging unit onto the shaped features. Now return from the extraction service and add to the analysis item, and send into the cross-hair component with a prop.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Thu, 01 Jun 2017 23:04:39 +0100 |
parents | a02e6ec4a9d2 |
children | 40ea40ebc2b3 |
line wrap: on
line source
/** * Created by lucas on 01/06/2017. */ import {VerticalScaleRenderer} from './waves-base.component'; import { ChangeDetectionStrategy, Component, ContentChildren, QueryList, AfterViewInit } from '@angular/core'; @Component({ selector: 'ugly-vertical-scale', template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush }) export class VerticalScaleComponent implements AfterViewInit { @ContentChildren( VerticalScaleRenderer ) bounded: QueryList<VerticalScaleRenderer>; protected cachedRanged: [number, number]; ngAfterViewInit(): void { this.bounded.forEach(component => { this.cachedRanged = component.range; if (this.cachedRanged) { component.renderScale(this.cachedRanged); } }); } }