Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIPE_STROKE_WIDTH is not used to set lineWidth #57

Closed
pixelzoom opened this issue Jun 28, 2022 · 1 comment
Closed

PIPE_STROKE_WIDTH is not used to set lineWidth #57

pixelzoom opened this issue Jun 28, 2022 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

For code review #41 ...

In MeanShareAndBalanceConstants.ts:

  PIPE_STROKE_WIDTH: 1,

I expected to see PIPE_STROKE_WIDTH used as the value for lineWidth option, perhaps in PipeNode.ts. But it only appears in 1 place in the entire sim, in PipeNode.ts:

    this.x = pipeModel.x + MeanShareAndBalanceConstants.CUP_WIDTH + MeanShareAndBalanceConstants.PIPE_STROKE_WIDTH / 2;

So I suspect that you're relying on scenery's default lineWidth (1), and that if I changed that lineWidth or PIPE_STROKE_WIDTH, it would break this code.

So recommendations:

  • Rename PIPE_STROKE_WIDTH to PIPE_LINE_WIDTH
  • Set lineWidth: PIPE_LINE_WIDTH as appropriate for components of PipeNode
@marlitas
Copy link
Contributor

marlitas commented Jun 30, 2022

Addressed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants