@bimdata/bcf-components 6.3.0-rc.2 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -199,6 +199,7 @@
|
|
|
199
199
|
import { computed, inject, ref, watch } from "vue";
|
|
200
200
|
import service from "../../service.js";
|
|
201
201
|
import { setViewpointDefaults } from "../../utils/viewpoints.js";
|
|
202
|
+
import { getViewerViewpoint } from "../../utils/viewer.js";
|
|
202
203
|
// Components
|
|
203
204
|
import BcfTopicImages from "./bcf-topic-images/BcfTopicImages.vue";
|
|
204
205
|
import BcfTopicSnapshots from "./bcf-topic-snapshots/BcfTopicSnapshots.vue";
|
|
@@ -349,8 +350,7 @@ export default {
|
|
|
349
350
|
($viewer?.globalContext.localContexts ?? [])
|
|
350
351
|
.filter(ctx => ctx.viewer && ctx.loadedModels.length > 0)
|
|
351
352
|
.map(async ctx => {
|
|
352
|
-
const viewpoint = ctx
|
|
353
|
-
viewpoint.snapshot = await ctx.getSnapshot();
|
|
353
|
+
const viewpoint = await getViewerViewpoint(ctx);
|
|
354
354
|
viewpointsToCreate.value.push(viewpoint);
|
|
355
355
|
})
|
|
356
356
|
);
|
package/src/utils/viewer.js
CHANGED
|
@@ -6,10 +6,9 @@ export function getViewerOptions($viewer) {
|
|
|
6
6
|
|
|
7
7
|
export async function getViewerViewpoint(context) {
|
|
8
8
|
const ctx = context.viewer.$viewer.localContext;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
9
|
+
const viewpoint = await ctx.getViewpoint();
|
|
10
|
+
viewpoint.snapshot = await ctx.getSnapshot();
|
|
11
|
+
return viewpoint;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export function highlightViewer(context) {
|