Grommas Dietz
Premium-
Posts
20 -
Joined
-
Last visited
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Everything posted by Grommas Dietz
-
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Question number one and your example make perfect sense, thank you! -
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Working on another project I run into another scenario where it’s necessary to switch the target. After resetting the target option, the scrolling speed gets faster on each switch within my early tests. Is there already a way of solving this issue or will it be possible to change the target in future versions? -
Is there a way of using limitCallbacks on a single instance of ScrollTrigger instead of using it globally inside scrolltrigger.config? In my project there is a quite simple lazyload mechanism observing videos and images. Since the user can jump directly to an anchor, I have to limit the callbacks. At the same time there is a fixed navigation with some logic which should not be affected by callback limitations.
-
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz replied to Grommas Dietz's topic in GSAP
At the first look it seems to work quite good for an isolated scroller in macOS Monterey 12.3.1 and Safari 15.4. But there are some jumps on iOS 15.4 (Safari, video attached). While working with an isolated scroller, it does not work well with multiple nested scrollers. With allowNestedScroll: true and target: ".vertical-1" it gets stuck inside the targeted scroller. When targeting .vertical-2 it is possible to scroll to the 2nd container, but we get stuck to the targeted container again as soon as we get there. Is it possible to target more than one scroller? Thank you for your investigations, really appreciate! jumping.mp4 -
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Thanks for your thoughts! The demo I provided already shows the jittering in MacOS Safari (tested with version 15.4). Here a short video of the jittering: jittering.mp4 jittering.mp4 -
normalizescroll ScrollTrigger: Normalize scroll and CSS Scroll Snap
Grommas Dietz replied to Grommas Dietz's topic in GSAP
I already assumed that it would not be easy to solve but wanted to share it anyway. Thank you! -
ScrollSmoother divs seem to get separated a little bit.
Grommas Dietz replied to Reinoud's topic in GSAP
Hey Reinoud Adding will-change to smooth-content seems to fix the problem! #smooth-content { will-change: transform; } -
normalizescroll ScrollTrigger: Normalize scroll and CSS Scroll Snap
Grommas Dietz posted a topic in GSAP
I’m still fiddling around with ScrollTrigger’s brand new normalizeScroll option. I tested it on CSS native Scroll Snap. Sadly it doesn’t play nice together and ends up in jumping directly to the scroll snap points without any visual scroll. I remember there was a bug with ScrollToPlugin and CSS Scroll Snap last year which got fixed. The fix was probably quite an easy task since the CSS Snap can be turned off while scrolling to the content. Is there any chance to get the normalization on native Scroll Snap, or is it required to move completely to GSAP snapping for that? It would be great to get a hint about the restriction in the docs to be aware of the limitation. -
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Thank you both for the answers, looks already promising that allowNestedScroll: true makes nested scrollers scrollable again. It’s not quite what I was looking for but this option makes it much more useful in cases of native scroll-snap galleries etc. @OSUblake: I was trying to fix pinned elements inside a set of multiple scroll containers. Pinned elements jitter in safari and position: sticky did not work in that specific case. @GreenSock: Would it be possible to normalize the scroll for nested scrollers or is this blowing up the code and the performance too much? I can imagine that it’s a downgrade to always bubble up the DOM to find the active scroller. It’s kind of annoying that Safari is the main cause, but since it’s one of the major browsers it would be a great benefit. -
normalizescroll ScrollTrigger: Normalize scroll on custom scroller
Grommas Dietz posted a topic in GSAP
Hey there Thanks for all your tools, the updates and new features. Really appreciate and love to work with it! Is it possible to normalize scroll on custom scrollers in future releases of ScrollTrigger? Currently the normalisation only works for the overall page, similar to ScrollSmoother, right? The CodePen provided is just a quick test in reference. Comment out ScrollTrigger.normalizeScroll(true); to see how it breaks the scrolling. -
scroll-snap and ScrollToPlugin not playing nice togehter?
Grommas Dietz replied to katerlouis's topic in GSAP
ah, that’s great, I will install the beta and give it a try! Thank you!:) -
scroll-snap and ScrollToPlugin not playing nice togehter?
Grommas Dietz replied to katerlouis's topic in GSAP
Will this be merged in the near future? I placed it in node_modules/gsap/dist manually. Not sure what’s getting picked when webpack builds my production js, but it only works in developing mode for me. -
scroll-snap and ScrollToPlugin not playing nice togehter?
Grommas Dietz replied to katerlouis's topic in GSAP
works perfectly for me, thank you! -
ScrollTo Plugin: Jumping on ongoing touch gestures
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Thank you all for your input, I will stick to my solution and disable it on touch devices. Not sure yet. Annoying, when it’s almost working.- 11 replies
-
- tweenmax
- scrollmagic
-
(and 1 more)
Tagged with:
-
ScrollTo Plugin: Jumping on ongoing touch gestures
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Other animations (moving header and content) are not affected, only when the ScrollTo plugin is triggered. That’s why I thought it could be related to the plugin. Sorry if I got it wrong!- 11 replies
-
- 1
-
- tweenmax
- scrollmagic
-
(and 1 more)
Tagged with:
-
ScrollTo Plugin: Jumping on ongoing touch gestures
Grommas Dietz replied to Grommas Dietz's topic in GSAP
I did without any luck. The plugin is supposed to scroll the window on all plattforms, that’s why I'm asking.. but thanks anyway, @mikel! Are there any plans to get something like this fixed, or is it a rare case and only partially related? Could try to reproduce it without ScrollMagic, to see if the problem still exist.- 11 replies
-
- tweenmax
- scrollmagic
-
(and 1 more)
Tagged with:
-
ScrollTo Plugin: Jumping on ongoing touch gestures
Grommas Dietz replied to Grommas Dietz's topic in GSAP
Hi @mikel, Thank you for your response. Can’t get it work with the tips in your link. The stackoverflow post is a couple of years old, I think with turning off the passive state of the touch event listeners you don’t need to listen to the scroll itself, with document.scrollingElement.scrollTop I don’t have to to get the window.pageYOffset. But I tried it nevertheless. Could you explain your answer so that I get a clue what you exactly mean? Here are my tries: // assume the feature isn't supported var supportsPassive = false; // create options object with a getter to see if its passive property is accessed var opts = Object.defineProperty && Object.defineProperty({}, 'passive', { get: function(){ supportsPassive = true }}); // create a throwaway element & event and (synchronously) test out our options document.addEventListener('test', function() {}, opts); // var allowScroll = true; function preventDefault(e) { e = e || window.event; if (e.preventDefault) { e.preventDefault(); } // if (e.stopImmediatePropagation) { // e.stopImmediatePropagation(); // } if (e.stopPropagation) { e.stopPropagation(); } e.returnValue = false; } function getBodyScrollTop() { var el = document.scrollingElement || document.documentElement; return el.scrollTop; // return window.pageYOffset } function setBodyScrollTop(scrollTop) { var el = document.scrollingElement || document.documentElement; el.scrollTop = scrollTop; // window.pageYOffset = scrollTop; } function addMousewheelListener() { if (e.addEventListener) { // IE9, Chrome, Safari, Opera e.addEventListener("mousewheel", preventScroll, supportsPassive ? { passive: false } : false); // Firefox e.addEventListener("DOMMouseScroll", preventScroll, supportsPassive ? { passive: false } : false); } // IE 6/7/8 else { e.attachEvent("onmousewheel", preventScroll); } } function removeMousewheelListener() { if (e.removeEventListener) { // IE9, Chrome, Safari, Opera e.removeEventListener("mousewheel", preventScroll, supportsPassive ? { passive: false } : false); // Firefox e.removeEventListener("DOMMouseScroll", preventScroll, supportsPassive ? { passive: false } : false); } // IE 6/7/8 else { e.detachEvent("onmousewheel", preventScroll); } } function removeTouchListeners(e) { window.removeEventListener("scroll", preventScroll); window.removeEventListener("touchmove", preventScroll); window.removeEventListener("touchstart", removeTouchListeners); window.removeEventListener("touchend", removeTouchListeners); } function preventScroll(e) { // if(TweenMax.isTweening(window) || !allowScroll) { // e.preventDefault(); // e.stopImmediatePropagation(); preventDefault(e) // } } function deactivateScroll() { // allowScroll = false; console.log('fired 1'); // window.addEventListener("touchstart", preventScroll, { passive: false }); window.addEventListener("touchmove", preventScroll, { passive: false }); window.addEventListener("scroll", preventScroll, { passive: false }); addMousewheelListener(); } function activateScroll() { // allowScroll = true; removeMousewheelListener(); // var scrollTop = y; // var scrollTop = getBodyScrollTop; // setBodyScrollTop(scrollTop); window.addEventListener("touchstart", removeTouchListeners, { passive: false }); window.addEventListener("touchend", removeTouchListeners, { passive: false }); // var event1 = new Event('touchstart'); // var event2 = new Event('touchmove'); // var event3 = new Event('touchend'); // window.dispatchEvent(event1); // window.dispatchEvent(event2); // window.dispatchEvent(event3); } Of course with the callbacks in my tween: var vh = window.innerHeight * 0.01; document.documentElement.style.setProperty('--vh', `${vh}px`); var ctrl = new ScrollMagic.Controller(); var sceneLeave = new ScrollMagic.Scene({ triggerElement: "#content", triggerHook: "onEnter", offset: 1 }) .addTo(ctrl) .on("enter", function(event) { TweenMax.to(window, 1, { scrollTo: { y: "#content", autoKill: false }, onStart: deactivateScroll, onComplete: activateScroll }); });- 11 replies
-
- tweenmax
- scrollmagic
-
(and 1 more)
Tagged with:
-
Hi there, Based on TweenMax, the ScrollTo Plugin and ScrollMagic (this is probably not where the problem came from): I wanna have a hero section on top of a page, only tweening downwards if the user is scrolling from the very beginning. Everything works as expected on my laptop (MBP). Following problem: If I use a touch-device (iPhone SE, iOS 12.4.1) and use a short touch gesture, the window is tweening to the destination withouth any issue. But if I keep my finger on the screen, the page starts to flicker and jumps back to the top after the tween finished. Is there any way to fix this behaviour? Already tried to toggle preventDefault with eventListeners on Callbacks as well as setting the position again onComplete. Since it's not working with Codepen on my mobile device (maybe because of the iframe issue since iOS11?): http://grommas-dietz.com/reduced-test.html reduced-test.mov
- 11 replies
-
- tweenmax
- scrollmagic
-
(and 1 more)
Tagged with:
-
draggable + throwprops slider similar to fullpage
Grommas Dietz replied to Grommas Dietz's topic in GSAP
thank you for your help osublake. saw your name already a couple of times. really appreciate! and great idea! kind of hard to get it work with draggable and throwprops, i guess. but i’ll try my best, still have to learn a lot. the rows move together in vertical navigation and separately in horizontal navigation. so everything get mixed up like a rubik’s cube. but each row has a different number of slides / various cells, this is also important as far as i understand your current code.- 5 replies
-
- draggable
- throwprops
-
(and 1 more)
Tagged with:
-
hello folks first post. and first of all – thank you for the nice work so far. i'm really glad to use all of your stuff. i want to create a fullpage.js like slider based on gsap. i used a couple of resources to build a prototype. the problem: it’s hard to get slides and sections in a loop. it works for vertical navigation, but i have no idea for the horizontal navigation. would be great to get some hints or even modifications / better solutions. best regards jakob
- 5 replies
-
- draggable
- throwprops
-
(and 1 more)
Tagged with: