Fix reset zoom button
This commit is contained in:
parent
3ebb2987c2
commit
a6f214d462
2 changed files with 12 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
<div *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" tabindex="0">
|
<button *ngIf="!routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title">
|
||||||
<ng-container *ngTemplateOutlet="content"></ng-container>
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
</div>
|
</button>
|
||||||
|
|
||||||
<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink">
|
<a *ngIf="routerLink" class="action-button" [ngClass]="classes" [ngbTooltip]="title" [routerLink]="routerLink">
|
||||||
<ng-container *ngTemplateOutlet="content"></ng-container>
|
<ng-container *ngTemplateOutlet="content"></ng-container>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'
|
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit } from '@angular/core'
|
||||||
import { GlobalIconName } from '@app/shared/shared-icons'
|
import { GlobalIconName } from '@app/shared/shared-icons'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -8,7 +8,7 @@ import { GlobalIconName } from '@app/shared/shared-icons'
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ButtonComponent implements OnChanges {
|
export class ButtonComponent implements OnInit, OnChanges {
|
||||||
@Input() label = ''
|
@Input() label = ''
|
||||||
@Input() className = 'grey-button'
|
@Input() className = 'grey-button'
|
||||||
@Input() icon: GlobalIconName = undefined
|
@Input() icon: GlobalIconName = undefined
|
||||||
|
@ -20,7 +20,15 @@ export class ButtonComponent implements OnChanges {
|
||||||
|
|
||||||
classes: { [id: string]: boolean } = {}
|
classes: { [id: string]: boolean } = {}
|
||||||
|
|
||||||
|
ngOnInit () {
|
||||||
|
this.buildClasses()
|
||||||
|
}
|
||||||
|
|
||||||
ngOnChanges () {
|
ngOnChanges () {
|
||||||
|
this.buildClasses()
|
||||||
|
}
|
||||||
|
|
||||||
|
private buildClasses () {
|
||||||
this.classes = {
|
this.classes = {
|
||||||
[this.className]: true,
|
[this.className]: true,
|
||||||
disabled: this.disabled,
|
disabled: this.disabled,
|
||||||
|
|
Loading…
Reference in a new issue