All files / app/codeCharta/ui/ribbonBar/linkColorMetricToHeightMetricButton linkColorMetricToHeightMetricButton.component.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 2/2
100% Lines 9/9

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 243x 3x 3x 3x   3x                 3x 4x   4x     1x      
import { Component } from "@angular/core"
import { isColorMetricLinkedToHeightMetricSelector } from "../../../state/store/appSettings/isHeightAndColorMetricLinked/isColorMetricLinkedToHeightMetric.selector"
import { toggleIsColorMetricLinkedToHeightMetric } from "../../../state/store/appSettings/isHeightAndColorMetricLinked/isColorMetricLinkedToHeightMetric.actions"
import { Store } from "@ngrx/store"
import { CcState } from "../../../codeCharta.model"
import { NgClass, AsyncPipe } from "@angular/common"
 
@Component({
    selector: "cc-link-color-metric-to-height-metric-button",
    templateUrl: "./linkColorMetricToHeightMetricButton.component.html",
    styleUrls: ["./linkColorMetricToHeightMetricButton.component.scss"],
    standalone: true,
    imports: [NgClass, AsyncPipe]
})
export class LinkColorMetricToHeightMetricButtonComponent {
    isColorMetricLinkedToHeightMetric$ = this.store.select(isColorMetricLinkedToHeightMetricSelector)
 
    constructor(private store: Store<CcState>) {}
 
    toggleIsColorMetricLinkedToHeightMetric() {
        this.store.dispatch(toggleIsColorMetricLinkedToHeightMetric())
    }
}