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

space time chart: picking only covers a portion of the stage when devicePixelRatio < 1 #915

Open
jacomyal opened this issue Feb 19, 2025 · 0 comments · May be fixed by #938
Open

space time chart: picking only covers a portion of the stage when devicePixelRatio < 1 #915

jacomyal opened this issue Feb 19, 2025 · 0 comments · May be fixed by #938
Assignees

Comments

@jacomyal
Copy link
Contributor

What happened?

get-issue-picking-small-dpr-noaudio.webm

When devicePixelRatio < 1, the picking layer only covers a related fraction of the stage. The video shows for instance that paths hovering only works in the top left quadrant of the stage, and does not work on the right or on the bottom.

What did you expect to happen?

Interactions should work similarly on the whole stage all the time.

How can we reproduce it (as minimally and precisely as possible)?

  1. Go to this page
  2. Zoom out in your browser (with Ctrl + - for instance)
  3. Try interacting with the paths in the bottom right of the stage

On which environments the bug occurs?

Local Storybook

On which browser the bug occurs?

Firefox

@jacomyal jacomyal self-assigned this Feb 25, 2025
jacomyal added a commit that referenced this issue Feb 25, 2025
This commit fixes #915.

Details:
- Cleans unused and poorly named "number" argument from drawAliasedLine
- Adds a new optional "devicePixelRatio" argument to each canvas aliased
  drawing function
- Adds new devicePixelRatio argument to PickingDrawingFunction, and
  updates useCanvas accordingly
- Gives dpr from PickingDrawingFunction to aliased functions in every
  places where usePicking is called

Signed-off-by: Alexis Jacomy <[email protected]>
jacomyal added a commit that referenced this issue Feb 25, 2025
This commit fixes #915, and also improves picking performances, by
downscaling the picking layer.

Details:
- Cleans unused and poorly named "number" argument from drawAliasedLine
- Adds new get getPickingScalingRatio helper, that returns the picking
  downscaling ratio depending on the current devicePixelRatio value
- Fixes picking layers resize handling
- Adds a new optional "scalingRatio" argument to each canvas aliased
  drawing function
- Adds new scalingRatio argument to PickingDrawingFunction, and updates
  useCanvas accordingly
- Gives the scaling ratio from PickingDrawingFunction to aliased
  functions in every places where usePicking is called

Signed-off-by: Alexis Jacomy <[email protected]>
jacomyal added a commit that referenced this issue Feb 25, 2025
This commit fixes #915, and also improves picking performances, by
downscaling the picking layer.

Details:
- Cleans unused and poorly named "number" argument from drawAliasedLine
- Adds new get getPickingScalingRatio helper, that returns the picking
  downscaling ratio depending on the current devicePixelRatio value
- Fixes picking layers resize handling
- Adds a new optional "scalingRatio" argument to each canvas aliased
  drawing function
- Adds new scalingRatio argument to PickingDrawingFunction, and updates
  useCanvas accordingly
- Gives the scaling ratio from PickingDrawingFunction to aliased
  functions in every places where usePicking is called

Signed-off-by: Alexis Jacomy <[email protected]>
@jacomyal jacomyal linked a pull request Feb 25, 2025 that will close this issue
jacomyal added a commit that referenced this issue Feb 27, 2025
This commit fixes #915, and also improves picking performances, by
downscaling the picking layer.

Details:
- Cleans unused and poorly named "number" argument from drawAliasedLine
- Adds new get getPickingScalingRatio helper, that returns the picking
  downscaling ratio depending on the current devicePixelRatio value
- Fixes picking layers resize handling
- Adds a new optional "scalingRatio" argument to each canvas aliased
  drawing function
- Adds new scalingRatio argument to PickingDrawingFunction, and updates
  useCanvas accordingly
- Gives the scaling ratio from PickingDrawingFunction to aliased
  functions in every places where usePicking is called

Signed-off-by: Alexis Jacomy <[email protected]>
jacomyal added a commit that referenced this issue Feb 28, 2025
This commit fixes #915, and also improves picking performances, by
downscaling the picking layer.

Details:
- Cleans unused and poorly named "number" argument from drawAliasedLine
- Adds new get getPickingScalingRatio helper, that returns the picking
  downscaling ratio depending on the current devicePixelRatio value
- Fixes picking layers resize handling
- Adds a new optional "scalingRatio" argument to each canvas aliased
  drawing function
- Adds new scalingRatio argument to PickingDrawingFunction, and updates
  useCanvas accordingly
- Gives the scaling ratio from PickingDrawingFunction to aliased
  functions in every places where usePicking is called

Signed-off-by: Alexis Jacomy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant