@bimdata/bcf-components 6.2.0-rc.4 → 6.2.1-rc.1
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
|
@@ -346,10 +346,10 @@ export default {
|
|
|
346
346
|
|
|
347
347
|
const createViewpoints = () => {
|
|
348
348
|
Promise.all(
|
|
349
|
-
($viewer?.globalContext.
|
|
350
|
-
.filter(
|
|
351
|
-
.map(
|
|
352
|
-
|
|
349
|
+
($viewer?.globalContext.localContexts ?? [])
|
|
350
|
+
.filter(ctx => ctx.viewer && ctx.loadedModels.length > 0)
|
|
351
|
+
.map(ctx =>
|
|
352
|
+
ctx.getViewpoint().then(viewpoint => viewpointsToCreate.value.push(viewpoint))
|
|
353
353
|
)
|
|
354
354
|
);
|
|
355
355
|
};
|
|
@@ -449,8 +449,9 @@ export default {
|
|
|
449
449
|
let newTopic;
|
|
450
450
|
if (isCreation.value) {
|
|
451
451
|
if ($viewer) {
|
|
452
|
-
data.models = $viewer.globalContext.
|
|
453
|
-
.
|
|
452
|
+
data.models = $viewer.globalContext.localContexts
|
|
453
|
+
.filter(ctx => ctx.viewer)
|
|
454
|
+
.flatMap(ctx => ctx.loadedModelIds);
|
|
454
455
|
}
|
|
455
456
|
newTopic = await service.createTopic(props.project, data);
|
|
456
457
|
} else {
|
|
@@ -215,10 +215,10 @@ export default {
|
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
-
const createViewpoint = async ({
|
|
219
|
-
unhighlightViewer(
|
|
218
|
+
const createViewpoint = async ({ context }) => {
|
|
219
|
+
unhighlightViewer(context);
|
|
220
220
|
viewerSelectVisible.value = false;
|
|
221
|
-
viewpoint.value = await
|
|
221
|
+
viewpoint.value = await context.getViewpoint();
|
|
222
222
|
};
|
|
223
223
|
|
|
224
224
|
const canEditComment = comment => {
|
package/src/utils/viewer.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
export function getViewerOptions($viewer) {
|
|
2
|
-
return $viewer.globalContext.
|
|
3
|
-
.
|
|
2
|
+
return $viewer.globalContext.localContexts
|
|
3
|
+
.filter(ctx => ctx.viewer)
|
|
4
|
+
.map((ctx, i) => ({ key: ctx.id, index: i, name: ctx.viewer.$plugin.name, context: ctx }));
|
|
4
5
|
}
|
|
5
6
|
|
|
6
|
-
export function highlightViewer(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export function highlightViewer(context) {
|
|
8
|
+
context.el.style.boxSizing = "border-box";
|
|
9
|
+
context.el.style.border = "2px solid var(--color-primary)";
|
|
10
|
+
context.el.style.opacity = ".85";
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
export function unhighlightViewer(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
export function unhighlightViewer(context) {
|
|
14
|
+
context.el.style.boxSizing = "";
|
|
15
|
+
context.el.style.border = "";
|
|
16
|
+
context.el.style.opacity = "";
|
|
16
17
|
}
|