Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

blaasvaer

Members
  • Posts

    37
  • Joined

  • Last visited

Recent Profile Visitors

525 profile views

blaasvaer's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. So, finally isolated the issue, and as expected. No problems. The only thing that's left now, is wasting a good chunk of life to hunt down bugs in poorly organized code … seriously don't know why I'm still in this business.
  2. As said, I'm about to completely isolate it. But being a Wordpress solution using SASS, it's a pretty nightmare to extract the relevant code.
  3. Yes, I was aware of that. And that was removed. But the problem persists. Unfortunately.
  4. Thanks, but that seems to not be the case. I'm pulling all relevant code out of the spaghetti it's in at the moment to create an isolated version. To see if that can get me any closer. But there's really not that much going on in this case, as you can see in the above CSS and JS (further up the post).
  5. Erm, thanks. But I do know that. This was just partial code to illustrate that it didn’t have anything to do with () at the end. The issue isn’t solved, but has to do with some weird height behaviour of some kind. But you can only spend so much time trying to figure weird stuff out. And then think of another solution.
  6. It must have something to do with WHEN GSAP thinks the height is 0. Just don't know what ...
  7. Well, I'm sure you're right. 'Cause that behaviour would be what I would expect. But I simply cannot figure out what part of the 'height' is causing this ... This is the css for the menu container: .menu-my-main-menu-container { display: block; position: fixed; background-color: pink; width: 100%; height: 0%; overflow: hidden; z-index: 2; ul#primary-menu { padding: 10% 15%; li { a { font-size: 1.25em; font-weight: 100; line-height: 2.5em; text-transform: uppercase; color: $black; text-decoration: none; } ul.sub-menu { display: none; position: relative; left: 10%; top: 0; @media screen and (max-width: 800px) { position: relative; left: 5%; } li { a { color: $black; } } } } li.inactive { a { color: lightgrey; } } } }
  8. I agree, unless you see all the code it's hard. But sharing a complete wordpress website seem overkill. And picking out the parts will become an umanageable nightmare. So, there we are ; )
  9. Yes, I've been playing hundreds of .mov files from my server. But just today I cannot play this exact one – I'm in a tech black hole today I'm afraid – uploaded a 720p version. http://www.blaasvaer.dk/oncomplete_720p.mov
  10. I changed to close time to 5 sec. for being able to see what's going on. If I animate the height property with GSAP it doesn't work. But if I do it in the inspector it behaves as expected (do not disappear before complete collaps). It's as if if fires the second the container hits the content. See it in action here: http://www.blaasvaer.dk/oncomplete.mov
  11. It'll probably take half a day to 'remove' the code from the context. I will record a video to explain further, as I thought it had to do with the nested elements being 'moved around' by the 'collapsing' height. That seem not to be the issue, but rather 'when' gsap fires the 'onComplete' handler ...
  12. This is the entire class, nothing fancy going on: class Navigation { constructor () { this.addEventListeners(); } addEventListeners () { let _this = this; let logo = $('.logo'); let nav_icon_burger = $('a.nav_icon.burger'); nav_icon_burger.on('click', function ( e ) { e.preventDefault(); e.stopPropagation(); $(this).toggleClass('open'); if ( $(this).hasClass('open') ) { open_main_menu(); $('body').addClass('no_scroll'); } else { close_main_menu(); $('body').removeClass('no_scroll'); } }); function open_main_menu () { if ( window.matchMedia( "(max-width: 840px)" ).matches ) { TweenLite.to('.menu-my-main-menu-container', 0.35, { left: 0, height: "100%", ease: Power1.easeIn} ); } else { TweenLite.to('.menu-my-main-menu-container', 0.35, { height: "100%", ease: Power1.easeIn} ); } } function close_main_menu () { nav_icon_burger.removeClass('open'); TweenLite.to('.menu-my-main-menu-container', 0.35, { height: '0', ease: Power1.easeIn, onComplete: hideMenu } ); } function hideMenu () { $('.menu-my-main-menu-container').hide(); } } } export default Navigation;
  13. Ok, but I have this, and it still fires immediately: function close_main_menu () { TweenLite.to('.menu-my-main-menu-container', 0.35, { height: '0', ease: Power1.easeIn, onComplete: hideMenu } ); } function hideMenu () { $('.menu-my-main-menu-container').hide(); } What am I doing wrong?
  14. One of the things that keeps bugging me about GSAP is the fact that I don't know what each 'Tween <Lite, Max ... etc >' is capable of out of the box. When do I have to add whatever random plugin to be able to do certain stuff. Now, I was fiddling around with the easings of a TweenLite ... but no matter what I put it nothing really seemed to change. Then I though, »Well, maybe I can't even do that without some plugin?«. Could I for instance just slam: ``` ease: RoughEase.ease.config({ template: Power0.easeNone, strength: 1, points: 20, taper: "none", randomize: true, clamp: false }), y: -500 } ``` to the ease property of a TweenLite? If not, how would I know? Is there any place somewhere on this site – the docs maybe – where I can get a complete overview of what each 'package' it capable of out of the box, without any plugins? If not, then I'd suggest that feature to have.
  15. Funny, now after posting I wanted to make a screen recording to show the issue. And it suddenly works. I did however notice a veeeeeeeery long initial background page load (dependencies loading via xhr I suspect), and the basic clearing of the search and the like wasn't working until after a while. Now, could it be that the load process of external libraries could cause the issue more or less randomly?
×