Skip to main content
Senior III
May 5, 2025
Solved

Is UpdateCenterItem called after animateToItem ?

  • May 5, 2025
  • 1 reply
  • 318 views

I have two buttons (up and down) that moves by one step the scroll wheel using the function animateToItem

It seems, but I may be wrong, that UpdateCenterItem is not called when animateToItem, is executed Is it correct?

Best answer by nico23

@GaetanGodart wrote:

I am not sure what is "UpdateCenterItem".


Per your documentation is the function that it's called specifically for the item currently selected on the scroll wheel


@GaetanGodart wrote:

However, when calling animateToItem, the elements gets updated to show the correct information.


yes, I can confirm that, however if I use in the code the animateToItem(x) the visualization correctly shows the item x as the selected item but, it seems it does not trigger the UpdateCenterItem

Anyway, I've just figured out that the function "is therefore only generated if the usage of a Selected Style Template is selected." which I hadn't selected.

Turning on Selected Style Template made the function animateToItem work

1 reply

GaetanGodart
Technical Moderator
May 5, 2025

Hello @nico23 ,

 

I am not sure what is "UpdateCenterItem".

However, when calling animateToItem, the elements gets updated to show the correct information.

Is it not what you experienced?

 

Regards,

nico23AuthorBest answer
Senior III
May 5, 2025

@GaetanGodart wrote:

I am not sure what is "UpdateCenterItem".


Per your documentation is the function that it's called specifically for the item currently selected on the scroll wheel


@GaetanGodart wrote:

However, when calling animateToItem, the elements gets updated to show the correct information.


yes, I can confirm that, however if I use in the code the animateToItem(x) the visualization correctly shows the item x as the selected item but, it seems it does not trigger the UpdateCenterItem

Anyway, I've just figured out that the function "is therefore only generated if the usage of a Selected Style Template is selected." which I hadn't selected.

Turning on Selected Style Template made the function animateToItem work