Skip to content

Commit

Permalink
Update Cognite3DViewer.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nilscognite committed Jun 4, 2024
1 parent 861d858 commit 9312da7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions viewer/packages/api/src/public/migration/Cognite3DViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,7 @@ export class Cognite3DViewer {
*/
addCadModel(options: AddModelOptions): Promise<CogniteCadModel> {
const modelLoaderSequencer = this._addModelSequencer.getNextSequencer<void>();
const result = this.addCadModelWithSequencer(options, modelLoaderSequencer);
this.recalculateBoundingBox();
return result;
return this.addCadModelWithSequencer(options, modelLoaderSequencer);
}

private async addCadModelWithSequencer(
Expand Down Expand Up @@ -804,9 +802,7 @@ export class Cognite3DViewer {
*/
addPointCloudModel(options: AddModelOptions): Promise<CognitePointCloudModel> {
const sequencerFunction = this._addModelSequencer.getNextSequencer<void>();
const result = this.addPointCloudModelWithSequencer(options, sequencerFunction);
this.recalculateBoundingBox();
return result;
return this.addPointCloudModelWithSequencer(options, sequencerFunction);
}

private async addPointCloudModelWithSequencer(options: AddModelOptions, modelLoadSequencer: SequencerFunction<void>) {
Expand Down

0 comments on commit 9312da7

Please sign in to comment.