File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
extended-reality/view-objects/vr Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 11// @ts -ignore because three mesh ui's typescript support is not fully matured
2- import ScrollUpButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/scroll-up-button' ;
3- import ScrollDownButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/scroll-down-button' ;
4- import OpenEntityButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/open-entity-button' ;
5- import ThreeMeshUI from 'three-mesh-ui' ;
62import DetailInfoScrollarea from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/detail-info-scrollarea' ;
3+ import OpenEntityButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/open-entity-button' ;
4+ import ScrollDownButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/scroll-down-button' ;
5+ import ScrollUpButton from 'explorviz-frontend/src/utils/extended-reality/view-objects/vr/scroll-up-button' ;
76import * as THREE from 'three' ;
7+ import ThreeMeshUI from 'three-mesh-ui' ;
88
99export default class DetailInfoMesh extends ThreeMeshUI . Block {
1010 /*implements IntersectableObject*/ sourceClass : string ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ let WIDTH_METRIC: string;
1313let WIDTH_METRIC_MULTIPLIER : number ;
1414let DEPTH_METRIC : string ;
1515let DEPTH_METRIC_MULTIPLIER : number ;
16-
16+ let COMPONENT_HEIGHT : number ;
1717/**
1818 * Sets the visualization settings needed for circle layout.
1919 * This should be called before using circle layout functions.
@@ -27,6 +27,7 @@ export function setCircleLayoutSettings() {
2727 DEPTH_METRIC_MULTIPLIER = vs . classDepthMultiplier . value ;
2828 APP_LABEL_MARGIN = vs . appLabelMargin . value ;
2929 APP_MARGIN = vs . appMargin . value ;
30+ COMPONENT_HEIGHT = vs . openedComponentHeight . value ;
3031}
3132
3233/**
@@ -94,7 +95,7 @@ export function applyCircleLayoutToClasses(
9495 classLayout . width = CLASS_FOOTPRINT ;
9596 classLayout . depth = CLASS_FOOTPRINT ;
9697 classLayout . height = CLASS_FOOTPRINT ;
97- classLayout . positionY = classLayout . height / 2.0 ; // Place directly on foundation
98+ classLayout . positionY = COMPONENT_HEIGHT * 2 ; // Place directly on foundation
9899
99100 // As Label and regular margin can differ, we offset by half the label margin difference
100101 const zMarginOffset = - APP_LABEL_MARGIN / 2 + APP_MARGIN / 2 ;
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ export function applySpiralLayoutToClasses(
9898 const { visualizationSettings : vs } = useUserSettingsStore . getState ( ) ;
9999 const CLASS_FOOTPRINT = vs . classFootprint . value ;
100100 const CLASS_MARGIN = vs . classMargin . value ;
101+ const COMPONENT_HEIGHT = vs . openedComponentHeight . value ;
101102 const APP_LABEL_MARGIN = vs . appLabelMargin . value ;
102103 const APP_MARGIN = vs . appMargin . value ;
103104 const SPIRAL_CENTER_OFFSET = vs . spiralCenterOffset . value ;
@@ -177,7 +178,7 @@ export function applySpiralLayoutToClasses(
177178 classLayout . width = CLASS_FOOTPRINT ;
178179 classLayout . depth = CLASS_FOOTPRINT ;
179180 classLayout . height = CLASS_FOOTPRINT ;
180- classLayout . positionY = classLayout . height / 2.0 ; // Place directly on foundation
181+ classLayout . positionY = COMPONENT_HEIGHT * 2 ; // Place directly on foundation
181182
182183 // Calculate position based on current grid coordinates
183184 const classX = centerX + spiralState . x * spacing - CLASS_FOOTPRINT / 2 ;
You can’t perform that action at this time.
0 commit comments