stephane-monnot / react-vertical-timeline

Vertical timeline for React.js
https://stephane-monnot.github.io/react-vertical-timeline/
MIT License
1.07k stars 158 forks source link

Issue with Scroll and Alignment. #16

Closed RafaelRojasCov closed 6 years ago

RafaelRojasCov commented 6 years ago

I have a problem with Alignment of cards (it's a little bit aligned to the left <-) and a big problem with scrolling (the -> right-side cards don't appears)

fm0jlgz

unfortunately I think it's a problem with a dependency, because for comparing purposes I also downloaded your "resume" to see if I could find my solution there, but I ran a "npm install" in your "resume" repo, and after I ran a "npm start" and also the problem is there.

so I think some dependency has updated and make a conflict with this timeline-component. I tried to fix by my own, but I can't find the source of the issue :(

this is my package.json "dependencies": { "@fortawesome/fontawesome-free-brands": "^5.0.13", "@fortawesome/fontawesome-free-regular": "^5.0.13", "@fortawesome/fontawesome-free-solid": "^5.0.13", "@fortawesome/fontawesome-svg-core": "^1.2.2", "@fortawesome/react-fontawesome": "^0.1.2", "bootstrap": "^4.1.3", "jquery": "^3.3.1", "npm": "^6.4.1", "popper.js": "^1.14.4", "react": "^16.4.2", "react-dom": "^16.4.2", "react-router-dom": "^4.3.1", "react-scripts": "1.1.4", "react-vertical-timeline-component": "^2.1.3", "styled-components": "^3.4.4" },

stephane-monnot commented 6 years ago

Sorry for the delayed response. I think the problem is likely due to box-sizing: border-box

Maybe related to this issue : #3

RafaelRojasCov commented 6 years ago

Thank you!, I have found that same fix, I added a width 44% and it solves the problem of alignment. But the second problem is still there.

Maybe if you run an "npm install" to your example repos you could have the problem too. I read the code and maybe the problem could be the "react-visibility-sensor" (not sure but it could be).

Only right-side cards don't appears when scroll :( The right-side cards don't toggle from "invisible" to "bounce in"

A temporary fix for this problem is deactivating the "animation" in parent.

stephane-monnot commented 6 years ago

I published a new version : 2.1.5. It should fix the problem of right-side card.

RafaelRojasCov commented 6 years ago

It fixed!! Thank you very much!!! =) <3