Not to mention how messed up “timelines” are. I have the following code:
import wixAnimations from ‘wix-animations’;
import wixLocation from ‘wix-location’;
//menu buttons - home page
export function menuText1_mouseIn(event) {
let timeline1 = wixAnimations.timeline();
let timeline2 = wixAnimations.timeline();
let timeline3 = wixAnimations.timeline();
let fadeOptions = {
“duration”: 120,
“delay”: 0
}
timeline1
.add($w(‘#menuText1’), {
“rotate”: 0,
“scale”: 1.08,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline2
.add($w(‘#menuLine1On’), {
“rotate”: 0,
“scale”: 1.08,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline3
.add($w(‘#menuLine1Highlight’), {
“rotate”: 0,
“scale”: 1.08,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline1.play();
timeline2.play()
timeline1.onStart(() => {
$w('#menuLine1Highlight').expand("fade", fadeOptions)
timeline3.play()
});
}
export function menuText1_mouseOut(event) {
let timeline1 = wixAnimations.timeline();
let timeline2 = wixAnimations.timeline();
let timeline3 = wixAnimations.timeline();
let fadeOptions = {
“duration”: 120,
“delay”: 0
}
timeline1
.add($w(‘#menuText1’), {
“rotate”: 0,
“scale”: 1.0,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline2
.add($w(‘#menuLine1On’), {
“rotate”: 0,
“scale”: 1.0,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline3
.add($w(‘#menuLine1Highlight’), {
“rotate”: 0,
“scale”: 1.0,
“duration”: 200,
“easing”: “easeInOutCubic”
})
timeline1.play();
timeline2.play();
timeline1.onStart(() => {
$w('#menuLine1Highlight').collapse("fade", fadeOptions)
timeline3.play()
});
}
export function menuText1_click(event) {
wixLocation.to(“/home”)
}
I pasted only the code for one of my menu buttons. Basically I have other two parts similar to the code above set up for the other two menu buttons.
Everything works fine, all menu links become bigger when I hover the mouse over them and they go back to normal when I no longer hover them.
The issue here is that when I click on one of the links, some random other links in the menu become bigger even if I didn’t hover the mouse over them.