Closed dxdc closed 11 months ago
Attention: 1 lines
in your changes are missing coverage. Please review.
Comparison is base (
2e1c453
) 83.17% compared to head (84c512a
) 83.20%.
Files | Patch % | Lines |
---|---|---|
src/GLModel.ts | 94.73% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@dkoes one comment here:
gapLength = (cylinderLength - totalDashLength) / totalSegments;
This is actually not the correct way to calculate it. Probably it should be more exactly something like:
gapLength = totalSegments > 1 ? (cylinderLength - totalDashLength) / (totalSegments - 1) : 0;
However, that yields some strange behavior as far as the cylinder coloration - because it looks as if the bonds are created in equal halves - and you can get some half bonds of differing colors.
I'm not an expert on the downstream steps here, and I'm not entirely sure why having a slightly smaller gapLength fixes that issue. I imagine there is something more robust.
I'm not sure what the issue is with coloration - the test cases look like an improvement to me, so I'm going to go ahead and merge.
Builds on https://github.com/3dmol/3Dmol.js/pull/641
Previously the dash calculation was only integrated into drawDashedStickImposter. This was inflexible, as there was no native support for dashes in GLDraw.drawCylinder.
Updated dash calculation algorithm. Seems to result in improved behavior.