Skip to content

Commit 7e4ca1d

Browse files
committed
now uses BondsCalculator if no bonds are provided
1 parent aa5ae0e commit 7e4ca1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/openmolecules/fx/viewer3d/V3DScene.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ public void optimizeView(V3DRotatableGroup group) {
428428
if (detail != null) {
429429
if (detail.isAtom() || detail.isBond()) {
430430
Point3D p = node2.localToScene(0.0, 0.0, 0.0);
431-
cameraZ = Math.min(cameraZ, p.getZ() - tanH * Math.abs(p.getX()-cog.getX()));
432-
cameraZ = Math.min(cameraZ, p.getZ() - tanV * Math.abs(p.getY()-cog.getY()));
431+
cameraZ = Math.min(cameraZ, p.getZ() - Math.max(5, tanH * Math.abs(p.getX()-cog.getX())));
432+
cameraZ = Math.min(cameraZ, p.getZ() - Math.max(5, tanV * Math.abs(p.getY()-cog.getY())));
433433
}
434434
}
435435
}

0 commit comments

Comments
 (0)