Open subtirelumihail opened 7 years ago
Hi @subtirelumihail I am interested in contributing to this repo and am also using it on my website. I just pull request which would add touch navigation and fixes #12
I hope we can continue supporting this repo and add more features to it.
Hi, sorry for my late response I very busy at the moment, but I can give you colaboration rights if you want to help out :)
Thank you for adding me as a Contributor. Sorry for my late reply, I was not well for some days.
I will be closing this for now because from now on I will contiune to support this
Still looking for collaborators
@subtirelumihail Hello! When I use this plugin, I meet some problems and I try to solve them, and I have some suggestions . Do you think that it's ok or not.
this.state.windowHeight
initial value is zero, it should be window.innerHeight
.this._childrenLength
is zero.
I think this is because you get this._childrenLength
in componentDidMount
, in this life cycle, asynchronous request data has not been returned, so we get this._childrenLength
is zero, so
this._childrenLength === activeSection
also occur error. Maybe you would like to do this in componentWillReceiveProps
or componentWillUpdate
life cycle?This question is more complicated than second, I will show my code:
render() {
let options = {
sectionClassName: 'section',
anchors: ['slide1', 'slide2', 'slide3', 'slide4'],
scrollBar: false,
navigation: true,
verticalAlign: false,
sectionPaddingTop: '0px',
sectionPaddingBottom: '0px',
arrowNavigation: true
};
return (
<SectionsContainer className="container" {...options}>
{this.state.data && this.state.data.map((item, index) =>
<Section key={index} >
<Link to={{pathname: '/products', query: {id: item.id}}}> More</Link>
</Section>
)}
<Section>
<h1>hello world</h1>
</Section>
</SectionsContainer>
)
}
the children item Section
consists of two parts: the first part's item length depend on this.state.data
, the second part is static view,if data's length is 3, the SectionsContainer.js should get this._childrenLength == 4
, but it is 2:
The first element is an array which length is 3, the second element is an object. so we get an error _childrenLength
.
_handleMouseWheel(event) {
...
if (this.state.scrollingStarted || activeSection < 0 || this._childrenLength === activeSection) {
return false;
}
...
}
so this._childrenLength === activeSection
caused scroll event not be triggered when activeSection's
value is 2.
I know this condition is in order to limit the last screen could not scroll down, I think this condition can be removed because you have used anchor
to limit this .
Hey, because I am very limited with my time, I am unable to keep maintaining this project, so I am hoping to organize a group of collaborators to help me turn this into a great project. So wants to join, please send me an email at mihail[@]subtirelu.info
Because I don't have a lot of time to maintain this, I am looking for contributors. Please reply with a comment and I will contact you so I can create a group a people that could maintain this plugin and maybe extend it even more