Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the bug with header not moving when scrolling horizontally #166

Closed
wants to merge 6 commits into from

Conversation

adiletelf
Copy link
Contributor

When you scroll the visual horizontally the expected behavior is for the header to stick in the same position, but it started to move left on the scroll, making it invisible for the user.

Now, with the scroll event the header is moving accordingly and is always visible.

src/timeLine.ts Outdated
@@ -1393,6 +1399,9 @@ export class Timeline implements powerbiVisualsApi.extensibility.visual.IVisual

this.renderTimeRangeText(timelineData, settings.rangeHeader);

// reset scroll position
Copy link

@Demonkratiy Demonkratiy Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this reset?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we change the granularity the visual triggers update event. Already existing header element has `transform="translate(x, 0)" value, meaning the scroll is not reset by default.

It's apparent no the screenshot below
image

@adiletelf adiletelf deleted the branch microsoft:dev September 23, 2024 16:23
@adiletelf adiletelf closed this Sep 23, 2024
@adiletelf adiletelf deleted the dev branch September 23, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants