Skip to content

Commit

Permalink
fix(*): fix hover button if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Apr 12, 2018
1 parent ff25d1e commit 444239a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/lib/layer/layer-item/layer-item.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h4 matLine [matTooltip]="layer.title +' ('+ id +') '" matTooltipShowDelay="500"
tooltip-position="below"
matTooltipShowDelay="500"
[matTooltip]="'igo.filter.layerFiltered' | translate"
[color]="gray"
color="gray"
disabled = true>
<mat-icon> filter_list </mat-icon>
</button>
Expand All @@ -29,7 +29,7 @@ <h4 matLine [matTooltip]="layer.title +' ('+ id +') '" matTooltipShowDelay="500"
[matTooltip]="layer.visible ?
('igo.layer.hideLayer' | translate) :
('igo.layer.showLayer' | translate)"
[color]="color"
[color]="layer.visible ? color : 'default'"
(click)="toggleVisibility()">
<mat-icon
[ngClass]='{disabled: !layer.isInResolutionsRange}'>
Expand Down
6 changes: 1 addition & 5 deletions src/lib/layer/layer-item/layer-item.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ export class LayerItemComponent implements OnDestroy {
private _edition: boolean = false;

@Input()
get color() {
this._color = this.layer.visible ? 'primary' : 'background';
return this._color;
}

get color() { return this._color; }
set color(value: string) {
this._color = value;
}
Expand Down
4 changes: 2 additions & 2 deletions src/themes/deeppurple-amber.styl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ mat-progress-spinner path {
stroke: $primary-color;
}

button.mat-icon-button.mat-primary:hover {
button.mat-icon-button.mat-primary:enabled:hover {
color: #4300b8;
}

button.mat-icon-button.mat-warn:hover {
button.mat-icon-button.mat-warn:enabled:hover {
color: #ff1100;
}

Expand Down

0 comments on commit 444239a

Please sign in to comment.