GSAP Scroll based animation with React breaking - css

I am using two different scroll based animation in two consecutive components which are working fine on their own i.e.. if i turn on either one of them they are working fine..
but it breaks when i turn both of them on it breaks.
the components I am taking about are pixelPerfectionist and Easter cube in App.js.
you can turn the use effect on and off in both these components to turn on/off the animation.
https://github.com/drifter089/another_one
next component jumps up after first animation.
so i treied to put blank section in middle of components.

Related

Stopping Swiperjs mid-transition

I would like to know a way to stop the swiperjs transition at the exact spot while it's transitioning.
What I currently have is a continuous autoplay loop combined with transition-timing-function : linear; on the swiper wrapper. This makes it look like it's constantly sliding one way in a fluent motion. On the background it is however always transitioning from slide to slide (and the transition-timing property makes it look fluent). What I would like to implement is when I hover the swiper, it stops at the exact position and when I leave the mouse it starts again. I have already implemented a fix to make it stop at the exact position using this link. When hovering out though, it moves too fast to the next translate3d point. This is because when starting it again, it takes the stopped position as the starting position of the transition, which is of different length so it moves at a different speed.
I've already gone as far as implementing an interval with the same speed count as the slider property to determine the progress of the animation from point to point so to from there be able to determine the transition-duration. For example when the slide transition is half way (in my case 3.5 seconds later as the speed I set is 7 seconds), I set the transition duration to 3500 on the swiper wrapper so that it moves at the same speed to the next point when hovering out.
This however is very buggy and relies on a continuous counter that starts upon loading the page (in mounted()), which isn't correct anymore after hovering a few times.
It's maybe a bit of a complex story but I would like to know if there are other ways of implementing this functionality, or how to somehow be able to know the current progression of the transition.
I'm building this in Nuxt 3 (vue.js framework) using the vue swiperjs library.
Thanks in advance

CSS Emotion is caching CSS despite variables

I'm using Emotion for CSS in a React project.
It's working correctly but I have one component that uses the css property with JS arguments and it seems Emotion is caching the CSS despite the variables changes.
Here's a CodeSandBox to test the behavior : https://codesandbox.io/s/youthful-lumiere-bfg7o
When you click on the images, the zoom should start from the top left corner of the image.
It works the first time, but after clicking multiple times on one image then another, Emotion is keeping values in cache (I logged the JS values before sending them to Emotion, you can check in the console)
Animation is slowed down to see the bug.
Thanks for the help

FullCalendar timeGridWeek dragging or selecting time slot stops working towards end of day

I am using Fullcalendar timeGridWeek side by side with dayGrid.
I can drag between the two and resize or drag in the timeGridWeek (the one on the left).
However, the problem is functionality is broken after hour 6PM or towards the end of the day, depending on the screen width.
I've also enabled clicking on time slot. I can click until 13:00. Anything after that stops working.
If I set the #container > * element to 1600px (on my ultrawide display) everything works correctly.
I can't figure out why.
I also have this running in a React App with MaterialUI and it behaves in the same way. I presumed it was something to do with the theme, but now can see it does the same thing with minimal styling.
Codepen: https://codepen.io/anon/pen/exabpW?editors=0010
This might come from the businessHours option, at pair with the eventConstraint: 'businessHours' option, which, if both are set together, disallow dragging and moving outside businessHours.
So the way to patch it would be to remove the eventConstraint option if u placed it, or change your businessHours
Apparently it's a confirmed bug: references here
https://github.com/fullcalendar/fullcalendar/issues/4503
and here
https://github.com/fullcalendar/fullcalendar/issues/4505

Performning Different Animation Based on a Button Click in Angular

Im currently designing an application in Ionic where I have a schedule for 5 days as an image. Now, I want to make a "detailed" view of each day that will fade in when one presses one out of 5 buttons, one for each day.
To do this, I use a CSS animation which pushes the image to the right a certain amount of pixels and then slides in two white images on top of the 4 days that shouldn't be visible.
My problem is that I have 5 animations, and I want to perform a different one depending on which of the 5 buttons is clicked. In angular, I can't do:
document.getElementById('image').setAttribute('animation', 'animation1 2s fade')
How would I go about passing the button information to CSS to perform these animations?
You can use Angular Web Animations API to do what ever the animation you want. But keep in mind you must get the right version since Ionic is behind the Angular.
npm install #angular/animations#4.1.3 --save --save-exact
Here is the great article about basics of it with Ionic.

can't embed edge animate in Bootstrap

I've produced Adobe edge animate animation. I am trying to use it in a Bootstrap 3 website. However, I can't find a way to embed it that respects the row and column formatting of bootstrap when the animation is published as "Responsive Scaling" The animation jus blows the boundaries of the columns every time.
Has anyone had success combining edge animate graphics in a bootstrap design?
I was having this exact same problem, try adding this to the javascript parameters in the header (after height & width etc):
bScaleToParent:"true"

Resources