Skip to content

Commit

Permalink
chore(Tabs): outputs are now called centering and centered (#1487)
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #1478
  • Loading branch information
shani-terminus authored and benjamincharity committed May 1, 2019
1 parent 9789cfe commit d85b207
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions terminus-ui/tabs/src/body/tab-body.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class TsTabBodyComponent implements OnInit, OnDestroy {
* Event emitted when the tab begins to animate towards the center as the active tab
*/
@Output()
readonly onCentering: EventEmitter<number> = new EventEmitter<number>();
readonly centering: EventEmitter<number> = new EventEmitter<number>();

/**
* Event emitted before the centering of the tab begins
Expand All @@ -164,7 +164,7 @@ export class TsTabBodyComponent implements OnInit, OnDestroy {
* Event emitted when the tab completes its animation towards the center
*/
@Output()
readonly onCentered: EventEmitter<void> = new EventEmitter<void>(true);
readonly centered: EventEmitter<void> = new EventEmitter<void>(true);


constructor(
Expand All @@ -188,7 +188,7 @@ export class TsTabBodyComponent implements OnInit, OnDestroy {
).subscribe((event) => {
// If the transition to the center is complete, emit an event.
if (this.isCenterPosition(event.toState) && this.isCenterPosition(this.positionState)) {
this.onCentered.emit();
this.centered.emit();
}

if (this.isCenterPosition(event.fromState) && !this.isCenterPosition(this.positionState)) {
Expand Down Expand Up @@ -217,7 +217,7 @@ export class TsTabBodyComponent implements OnInit, OnDestroy {
this.beforeCentering.emit(isCentering);

if (isCentering) {
this.onCentering.emit(this.elementRef.nativeElement.clientHeight);
this.centering.emit(this.elementRef.nativeElement.clientHeight);
}
}

Expand Down
4 changes: 2 additions & 2 deletions terminus-ui/tabs/src/collection/tab-collection.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
[content]="tab.content"
[position]="tab.position"
[origin]="tab.origin"
(onCentered)="removeTabBodyWrapperHeight()"
(onCentering)="setTabBodyWrapperHeight($event)"
(centered)="removeTabBodyWrapperHeight()"
(centering)="setTabBodyWrapperHeight($event)"
></ts-tab-body>
</div>

0 comments on commit d85b207

Please sign in to comment.