Canvas height shrinks as width shrinks (~ *0.5) (Scale ratio?)
See original GitHub issueExpected Behavior Canvas would responsively resize to fit window.
Actual Behavior Height shrinks to half of canvas width during resize. W:H scaling ratio appears to be set to 2:1.
Specifications Version: 2.1.0 Browsers: Firefox 57, Chrome 62 package.json:
"dependencies": {
"canvas-particle-network": "^1.5.0",
"material-ui": "^1.0.0-beta.21",
"material-ui-icons": "^1.0.0-beta.17",
"material-ui-search-bar": "^1.0.0-beta.3",
"react": "^16.1.1",
"react-dom": "^16.1.1",
"react-particles-js": "^2.1.0",
"react-scripts": "1.0.17",
"react-tap-event-plugin": "^3.0.2"
}
Possible Solution: Stackoverflow
The solution is likely relatively simple. I however don’t understand how preventing the 2:1 scale ratio is implemented in the React component. Upon resolving I can add a note to the Readme.md
Edit: formatting
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
@afparsons @EthanC you need to add style in the Particles
@begonaalvarezd You can use
Try this: