\\r\\n \\r\\n \\r\\n\\r\\n\";","export enum ViewerMenuEnum {\r\n VISIBLE = 0,\r\n TRANSLUCENT = 1,\r\n HIDDEN = 2\r\n}\r\n","import {autoinject,bindable} from \"aurelia-framework\";\r\nimport {EventAggregator, Subscription} from \"aurelia-event-aggregator\";\r\nimport { ContextMenuService } from \"app/services/context-menu-service\";\r\nimport { ViewerMenuEnum } from \"./viewer-menu-enums\";\r\nimport { SwitchItem } from \"./switch-item\";\r\nimport { ModalService } from \"app/services/modal-service\";\r\nimport { BaseViewerCombined } from \"app/components/base-viewer-combined/base-viewer-combined\";\r\nimport {ToolEnum} from \"../../../services/BimViewerThreeDServiceIF\";\r\n\r\ndeclare let $: any;\r\n\r\n@autoinject\r\nexport class ViewerMenu {\r\n @bindable public isWorkArea:boolean = false;\r\n\r\n\t@bindable public parent:BaseViewerCombined|undefined;\r\n\r\n\t// public openbimMode:boolean = false; \r\n\r\n private isViewersLoading: boolean = false;\r\n public isSettingsVisible: boolean = false;\r\n public isModelsShowing: boolean = false;\r\n public subscriptions: Subscription[] = [];\r\n public cropAll: boolean = false;\r\n public cropItems: SwitchItem[] = [];\r\n public directionsToCrop: string[] = [];\r\n public selectedTool = \"fa-solid fa-arrow-pointer\";\r\n public viewState: number = ViewerMenuEnum.VISIBLE;\r\n private anyItemsSelected: boolean = false;\r\n\r\n /* Bemaerk, den kommunikerer naesten udelukkende gennem EVENTS den sender og modtager.\r\n\t*/\r\n\r\n constructor(public eventAggregator: EventAggregator, public subscription: Subscription, \r\n\t\t public contextMenu: ContextMenuService, public modal: ModalService) \r\n\t{\r\n\t\tconsole.log('viewerMenu.ctor');\r\n }\r\n\r\n\tactivate() { console.log('viewerMenu.activate');}\r\n bind(): void {\r\n\t\tconsole.log('viewerMenu.bind');\r\n let self = this;\r\n this.subscriptions = [\r\n this.eventAggregator.subscribe('ViewerMenu:ChangeIsSettingsVisible', async () => {self.viewerSettingsClicked()}),\r\n this.eventAggregator.subscribe('ViewerMenu:ChangeModelToVisible', async (isVisible: boolean) => {self.changeModelsMenuVisibility(isVisible) }),\r\n this.eventAggregator.subscribe('ViewerMenu:viewers-finished-loading', async () => { this.isViewersLoading = false}),\r\n this.eventAggregator.subscribe('ViewerMenu:elements-selected', async (isElementSelected: boolean) => {this.anyItemsSelected = isElementSelected})\r\n ]\r\n this.cropItems = [\r\n {name: 'top',on: false},\r\n {name: 'bottom',on: false},\r\n {name: 'left',on: false},\r\n {name: 'right',on: false},\r\n {name: 'front',on: false},\r\n {name: 'back',on: false},\r\n ]\r\n }\r\n\tattached() { \r\n\t\tconsole.log('viewerMenu.attached', this.parent);\r\n }\r\n \r\n detached(): void {\r\n this.subscriptions.forEach((subscription: Subscription) => subscription.dispose());\r\n }\r\n\r\n openBimCheckboxClicked(event:any) {\r\n\t\tconst enabled:boolean = this.parent!.BVC_openBimMode;\r\n\t\tconsole.log('openBimCheckboxClicked, nowEnabled?',enabled);\r\n this.eventAggregator.publish('base-viewer-combined:openBimModeToggled', enabled);\r\n\t}\r\n\r\n\tpublic useFragments = false;\r\n\tuseFragmentsCheckbox(event:any) {\r\n\t\t//this.useFragments = !this.useFragments;\r\n\t\tconsole.log('useFragmentsCheckbox', this.useFragments);\r\n\t\tthis.eventAggregator.publish('debug:useFragments', this.useFragments);\r\n\t}\r\n\r\n async viewerSettingsClicked(): Promise