Skrollr refreshing issue - skrollr

I'm using skrollr in my site
It starts with an animation with fixed elements and the menu on bottom.
when it finished, the menu goes to absolute positioning, it is scrolled and when it reaches top, it get fixes again, but on top.
After the menu there is an absolute positioned section that goes over the animation.
The problem is when I slide down with jQuery some divs on this absolute positioning section, and after that, call refresh to fix the start of the animations.
When refresh is called, it fixed the animations that is inside the absolute positioned section, but it crashes the beginning animation because refresh change the start position of the animation...
The animation stay on its first state after refresh is called because it changes to start at a point the animation is no longer visible.
I wish I could refresh only the elements that are on the absolute positioned section

Try this -
var absolutePositioned = $('.refresh');
skrollr.init().refresh(absolutePosition);
or
var s = skrollr.init();
//...
s.refresh($(".refresh"));

Related

Vue v-expansion-panels move position randomly

I'm using v-expansion-panels from Vue, and I notice an odd behaviour: When expanding the panels the page scrolls randomly, sometimes it scrolls leaving the header on the top page, sometimes it scroll way down moving the desired panel out of sight so I have to scroll up.
Is this normal? Is there a way to control this random scrolling, so when expanding the panel the automatic scroll moves the page to the top of the window browser?
Thanks
Gerardo
I tried already all the v-expansion-panels attributes.

Why does my window reset after everytime I call SDL_RenderPresent()?

I was trying to implement viewport. The thing I was doing is that I render in one viewport, than I call SDL_RenderPresent to update screen and then again I implemented viewport. The whole process was being controlled by key pressing, meaning by tapping c it used to render first viewport and then next one. But calling SDL_RenderPresent after everytime rendering viewport was clearing up screen. Why is this happening? And can someone tell me that if SDL_Renderer works like a pen/brush with what we can draw things? If not, then how does it work?

How to stop ScrollView gliding?

In my case, I want to change some states only when the ScrollView is not gliding. I would like to know is there any way to implement it like list.stopGliding() or list.stopScrollMomentum()?
You can use:
onMomentumScrollBegin: Called when the momentum scroll starts (scroll which occurs as the ScrollView starts gliding).
and:
onMomentumScrollEnd: Called when the momentum scroll ends (scroll which occurs as the ScrollView glides to a stop).
or you can use:
onScrollBeginDrag: Called when the user begins to drag the scroll view.
and
onScrollEndDrag: Called when the user stops dragging the scroll view and it either stops or begins to glide.
If you want to stop all the momentum, you can use the prop:
decelerationRate={0}
To read more here's the documentation

React native scroll over interactive content

I watched this presentation and there's a section on how to build an IOS Maps like UI. When dragging from the bottom to top, it drags to the top, and after it reaches the top, it continues scrolling up. Also, when scrolling down, when it reached the top content of the ScrollView, it continues to drag down.
It is suggested that it can be done using ScrollView by adding an empty transparent cell as the first element on the ScrollView. I have tried implementing the same which can be found in this snack. In my case, instead of Maps, I am using another ScrollView.
But the problem is that the first element (transparent element) does not allow to interact with the First ScrollView elements. I have tried with pointerEvents inside the first transparent view and even in its parent ScrollView. But this does not help. Has anyone tried implementing this kind of use case with react-native? All I found was this library, but I think it's not maintained properly.
you need to set the z-index of the transparent view to send it under/behind the interactive content, here is a good resource:
https://philipwalton.com/articles/what-no-one-told-you-about-z-index/
Edit: Actually I could not accomplish it, it seems like everything inside a scrollview will always be behind or in front of other elements, it seems like you can't have part of the scrollview behind something else and another part in front of something else.

Animating during momentum scroll in react-native?

I'm attempting to create a custom NavBar on a screen that renders a ScrollView. Inside the NavBar, there's a button, that when pressed, causes the NavBar to translate downwards, thereby giving the appearance that the NavBar is expanding (This is done using Animated.spring() with the useNativeDriver option). Everything is working great, except if the ScrollView is still scrolling at the time the button is tapped (ie: when "momentum" scroll is taking place). In this scenario, the onPress handler that kicks off the NavBar animation is invoked as expected, but calls to Animated.spring() do not cause any animation to take place. Is it possible to either have the NavBar "expansion" animation to occur during the scroll, or pause the scroll to allow animation to proceed?
Like it's explained in RN docs the animation type you using are stoped by gesture events like scrolling, better use Animated.event() with onScrollprops combined with an interpolation animation to animate you footer.