Add temporary button for showing viewpoint in Revit

pull/7944/head
Wieland Lindenthal 5 years ago
parent 0d2d65b5ec
commit 96f6212356
  1. 6
      frontend/src/app/modules/bcf/bcf-buttons/bcf-add-viewpoint-button.component.ts
  2. 92
      frontend/src/app/modules/bcf/bcf-buttons/bcf-show-viewpoint-button.component.ts
  3. 3
      frontend/src/app/modules/bcf/bcf-wp-single-view/bcf-wp-single-view.component.html
  4. 7
      frontend/src/app/modules/bcf/openproject-bcf.module.ts
  5. 1
      modules/bim/config/locales/js-en.yml

@ -36,7 +36,7 @@ import {untilComponentDestroyed} from "ng2-rx-componentdestroyed";
@Component({
template: `
<a [title]="text.add_viewpoint" class="button import-bcf-button" (click)="handleClick()">
<a [title]="text.add_viewpoint" class="button" (click)="handleClick()">
<op-icon icon-classes="button--icon icon-add"></op-icon>
<span class="button--text"> {{text.viewpoint}} </span>
</a>
@ -59,12 +59,12 @@ export class BcfAddViewpointButtonComponent implements OnInit, OnDestroy {
console.log("handleClick");
const trackingId = this.revitBridgeService.newTrackingId();
this.revitBridgeService.sendMessageToRevit('createViewpoint', trackingId, '');
this.revitBridgeService.sendMessageToRevit('ViewpointGenerationRequest', trackingId, '');
this.revitBridgeService.revitMessageReceived$
.pipe(
distinctUntilChanged(),
filter(message => message.messageType === 'viewpointCreated' && message.trackingId === trackingId),
filter(message => message.messageType === 'ViewpointData' && message.trackingId === trackingId),
untilComponentDestroyed(this)
)
.subscribe(message => this.saveViewpoint(message));

File diff suppressed because one or more lines are too long

@ -7,4 +7,5 @@
</ngx-gallery>
</div>
<bcf-add-viewpoint-button></bcf-add-viewpoint-button>
<bcf-add-viewpoint-button></bcf-add-viewpoint-button>
<bcf-show-viewpoint-button></bcf-show-viewpoint-button>

@ -38,6 +38,7 @@ import {BcfPathHelperService} from "core-app/modules/bcf/helper/bcf-path-helper.
import {BcfExportButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-export-button.component";
import {BcfAddViewpointButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-add-viewpoint-button.component";
import {RevitBridgeService} from "core-app/modules/bcf/services/revit-bridge.service";
import {BcfShowViewpointButtonComponent} from "core-app/modules/bcf/bcf-buttons/bcf-show-viewpoint-button.component";
@NgModule({
imports: [
@ -54,13 +55,15 @@ import {RevitBridgeService} from "core-app/modules/bcf/services/revit-bridge.ser
BcfWpSingleViewComponent,
BcfImportButtonComponent,
BcfExportButtonComponent,
BcfAddViewpointButtonComponent
BcfAddViewpointButtonComponent,
BcfShowViewpointButtonComponent
],
exports: [
BcfWpSingleViewComponent,
BcfImportButtonComponent,
BcfExportButtonComponent,
BcfAddViewpointButtonComponent
BcfAddViewpointButtonComponent,
BcfShowViewpointButtonComponent
],
entryComponents: [
]

@ -6,6 +6,7 @@ en:
export: 'Export'
viewpoint: 'Viewpoint'
add_viewpoint: 'Add viewpoint'
show_viewpoint: 'Show viewpoint'
ifc_models:
models:
default: 'Default IFC models'

Loading…
Cancel
Save