Skip to content

Commit fb7b615

Browse files
committed
Fix method meshes
1 parent ce3eae3 commit fb7b615

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

src/components/visualization/rendering/popups/application-popups/method/method-popup.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ export default function MethodPopup({
4242
<th>Type</th>
4343
</thead>
4444
<tbody>
45-
{method.parameters.map((params) => (
46-
<tr key={params.name}>
47-
<td>{params.name}</td>
48-
<td>{params.type}</td>
49-
</tr>
50-
))}
45+
{method.parameters &&
46+
method.parameters.map((params) => (
47+
<tr key={params.name}>
48+
<td>{params.name}</td>
49+
<td>{params.type}</td>
50+
</tr>
51+
))}
5152
</tbody>
5253
</table>
5354
</>

src/view-objects/3d/application/method-group.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ export class MethodGroup extends THREE.Group {
3838

3939
// Compute geometry with width and height
4040
const box = new THREE.BoxGeometry(
41-
parentLayout.width / 4,
41+
parentLayout.width / 8,
4242
functionHeight,
43-
parentLayout.depth / 4
43+
parentLayout.depth / 8
4444
);
4545

4646
// Compute material and colors for method mesh
@@ -63,7 +63,7 @@ export class MethodGroup extends THREE.Group {
6363
boxMaterial,
6464
this.dataModel.methods[index]
6565
);
66-
methodHeightMesh.position.setX(methodHeightMesh.position.x - 0.7);
66+
methodHeightMesh.position.setX(methodHeightMesh.position.x + 0.85);
6767
methodHeightMesh.position.setY(
6868
-parentGeo.parameters.height / 2 + functionHeight / 2 + yPos
6969
);

0 commit comments

Comments
 (0)