Skip to content

Issue with visibleTimeEnd on first render #983

@jakegiles-phillips

Description

@jakegiles-phillips

Describe the bug
I'm currently experiencing an issue where I cannot seem to visibly scroll to the actual visibleTimeEnd of my timeline on first render of my view.
When I try to scroll to the end, the handleTimeChange function I have configured is reporting that my end value is already past my defined constraint - but visually my timeline has not yet reached this constraint.

Image

Image

Image

If however I then resize my window - the timeline begins to perform as expected, and I can scroll to the end of my constrained time.

I presume there is a bug occurring with the initial calculations of the visible time on this first render.

Is there a way I can programmatically trigger the timeline to recalculate as a quick workaround to this issue if there is no simple solution anyone is aware of?

To Reproduce

  1. Have a custom onTimeChange handler function on your timeline.
  2. Apply min/max constraints to the start and end values, preventing the visibleStartTime and visibleEndTime from being updated by the onTimeChange handler if these constraints are breached.
  3. See how the timeline doesn't visibly scroll to these constraints.
  4. See how the handler function reports it has scrolled to a position that isn't visibly reflected.
  5. Resize the window (don't reload page)
  6. See how you can now scroll visibly to the desired end constraints.

Expected behavior
Timeline should scroll as expected on first render when using the onTimeChange handler to update the visibleStartTime and visibleEndTime.

Screenshots
See above screeenshots.

Gif below demonstrates how I am unable to scroll to the end of the 17:30 slot until I resize the window slightly halfway through.
Image

Library Version
0.28.0

Desktop (please complete the following information):

  • OS: [Windows]
  • Browser [Chrome]
  • Version [142.0.7444.163 (Official Build) (64-bit)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions