Skip to content

Slider UI fix: pointer inputs not adjusted for adaptive scaling#17968

Merged
sebavan merged 1 commit intoBabylonJS:masterfrom
marns:fix-slider-input
Mar 2, 2026
Merged

Slider UI fix: pointer inputs not adjusted for adaptive scaling#17968
sebavan merged 1 commit intoBabylonJS:masterfrom
marns:fix-slider-input

Conversation

@marns
Copy link
Contributor

@marns marns commented Feb 25, 2026

With adaptive scaling active, transformCoordinates is required to bring pointer inputs into the correct slider space. Otherwise input pointer may be significantly off / remapped from visuals.

Fix: always transform pointer coordinates

@sebavan
Copy link
Member

sebavan commented Feb 26, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 26, 2026

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 26, 2026

Snapshot stored with reference name:
refs/pull/17968/merge

Test environment:
https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17968/merge/index.html

To test a playground add it to the URL, for example:

https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17968/merge/index.html#WGZLGJ#4600

Links to test your changes to core in the published versions of the Babylon tools (does not contain changes you made to the tools themselves):

https://playground.babylonjs.com/?snapshot=refs/pull/17968/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/17968/merge
https://gui.babylonjs.com/?snapshot=refs/pull/17968/merge
https://nme.babylonjs.com/?snapshot=refs/pull/17968/merge

To test the snapshot in the playground with a playground ID add it after the snapshot query string:

https://playground.babylonjs.com/?snapshot=refs/pull/17968/merge#BCU1XR#0

If you made changes to the sandbox or playground in this PR, additional comments will be generated soon containing links to the dev versions of those tools.

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 26, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 26, 2026

@bjsplat
Copy link
Collaborator

bjsplat commented Feb 26, 2026

Copy link
Member

@RaananW RaananW left a comment

Choose a reason for hiding this comment

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

Just for me to understand, the only change here is running the code even if the component's is 0, right?

@sebavan
Copy link
Member

sebavan commented Mar 2, 2026

@marns, any repro of the bug it creates ?

@marns
Copy link
Contributor Author

marns commented Mar 2, 2026

@RaananW right

@sebavan
Here's a repro before:
https://playground.babylonjs.com/#QZA0FG#2

and after:
https://playground.babylonjs.com/?snapshot=refs/pull/17968/merge#QZA0FG#2

Here you can see input is mapped to the middle 25% of the rendered slider
In my case it was mapping to last 25%

@sebavan sebavan merged commit 97627f4 into BabylonJS:master Mar 2, 2026
21 checks passed
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.

4 participants