All files / app/codeCharta/ui/customConfigs/customConfigList/customConfigItemGroup/customConfigDescription applyCustomConfigButton.component.ts

100% Statements 16/16
100% Branches 0/0
100% Functions 2/2
100% Lines 15/15

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 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 396x   6x 6x 6x 6x 6x 6x 6x 6x                 6x       36x 36x 36x 36x       2x                  
import { Component, Input } from "@angular/core"
import { CustomConfigItem } from "../../../customConfigs.component"
import { CustomConfigHelper } from "../../../../../util/customConfigHelper"
import { ThreeCameraService } from "../../../../codeMap/threeViewer/threeCamera.service"
import { ThreeMapControlsService } from "../../../../codeMap/threeViewer/threeMapControls.service"
import { Store } from "@ngrx/store"
import { ThreeRendererService } from "../../../../codeMap/threeViewer/threeRenderer.service"
import { MatDialogClose } from "@angular/material/dialog"
import { CustomConfig2ApplicableColor } from "../customConfig2ApplicableColor.pipe"
import { CustomConfigColorSchemaBySelectionMode } from "./customConfigColorSchemaBySelectionMode.pipe"
 
@Component({
    selector: "cc-apply-custom-config-button",
    templateUrl: "./applyCustomConfigButton.component.html",
    styleUrls: ["./applyCustomConfigButton.component.scss"],
    standalone: true,
    imports: [MatDialogClose, CustomConfig2ApplicableColor, CustomConfigColorSchemaBySelectionMode]
})
export class ApplyCustomConfigButtonComponent {
    @Input() customConfigItem: CustomConfigItem
 
    constructor(
        private store: Store,
        private threeCameraService: ThreeCameraService,
        private threeOrbitControlsService: ThreeMapControlsService,
        private threeRendererService: ThreeRendererService
    ) {}
 
    applyCustomConfig() {
        CustomConfigHelper.applyCustomConfig(
            this.customConfigItem.id,
            this.store,
            this.threeCameraService,
            this.threeOrbitControlsService,
            this.threeRendererService
        )
    }
}