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

JavaScript error when stacked or beginYAxisAt0 are false #15

Closed
bobbingwide opened this issue Sep 28, 2021 · 3 comments
Closed

JavaScript error when stacked or beginYAxisAt0 are false #15

bobbingwide opened this issue Sep 28, 2021 · 3 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@bobbingwide
Copy link
Owner

I'm not quite sure when this started happening but the JavaScript code generated in the PHP code to set the y axis attributes stacked and beginAt0 were not setting values in my local development environment, leading to a JavaScript error.

The solution is to implement a simple boolstring() method to return a string literal of true or false depending on the value of the passed parameter. This makes the syntax of the generated JS valid.

@bobbingwide bobbingwide added bug Something isn't working question Further information is requested labels Sep 28, 2021
@bobbingwide bobbingwide self-assigned this Sep 28, 2021
@bobbingwide
Copy link
Owner Author

Delivered in v0.4.1

bobbingwide added a commit that referenced this issue Feb 24, 2022
bobbingwide added a commit that referenced this issue Feb 24, 2022
bobbingwide added a commit that referenced this issue Feb 24, 2022
bobbingwide added a commit that referenced this issue Feb 24, 2022
bobbingwide added a commit that referenced this issue Feb 24, 2022
bobbingwide added a commit that referenced this issue Feb 24, 2022
@bobbingwide
Copy link
Owner Author

Note: The values in the input field for the RangeControls appear differently for valid reasons.

image

  • Opacity defaults to 0.8
  • Height defaults to null, but the initialPosition is hardcoded to 450
  • Bar Thickness defaults to null. initialPosition is set to attributes.barThickness - which is null
  • Tension defaults to 0

The fact that Bar Thickness doesn't show a value is expected.

The fact that the slider parts vary in width was also noted here bobbingwide/oik-bob-bing-wide#46 (comment)

@bobbingwide
Copy link
Owner Author

Not sure why I added the above comment to this particular issue.
It was probably because I'd previously tagged this issue in commits associated with Bar Thickness.

The screenshot demonstrates what happens when the value is null and the initialPosition is also null... which is what happens for Bar Thickness because both attributes are set from attributes.barThickness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant