Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Return to first FlipPage page - feature request #12

Open
leslielyj opened this issue Jul 10, 2019 · 3 comments
Open

Return to first FlipPage page - feature request #12

leslielyj opened this issue Jul 10, 2019 · 3 comments

Comments

@leslielyj
Copy link

Just curious if there is any further development on this package?

Feature Request: I would like to navigate to the first flippage page. With the existing ref feature, we can put a ref on the first flip and have a button listener on each subsequent page to click and which will direct to the first page, but there is no way to flip to the first flip, the only thing coming close is the window.scrollTo which only works for ScrollView.

@darenju
Copy link
Owner

darenju commented Jul 10, 2019

Yes, this could be an interesting feature. The idea would be to trigger animation, wait a delay, then trigger animation again until reaching first page.

I can try to work on that some time.

@vivekjain751
Copy link

const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
animationLoop=async(count=6,value= 60)=>{
for(intTimes=1;intTimes<=count;intTimes++){
for(index=0;index<value;index++){
if(intTimes%2 == 0){
this.handlePanResponderMove(null,{dx:intTimes,dy:-(value-(index*2))})
}else{
this.handlePanResponderMove(null,{dx:intTimes,dy:-(0+(index))})
}
await sleep(1)
}
}
}

@vivekjain751
Copy link

@leslielyj @darenju check this trick :)

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

No branches or pull requests

3 participants