-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[NME] fix wheel behaviour and overscroll #12537
Conversation
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
ohhhhh thanks a lot for the PR looks good to me but will add ppl who know way more than myself about the nme editor :-) |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12537/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12537/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/12537/merge#BCU1XR#0 |
Remember to clear browser's cache please... 😅 |
Visualization tests for webgl2 have failed. If some tests failed because the snapshots do not match, the report can be found at If tests were successful afterwards, this report might not be available anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Certainly a needed change.
I'm not sure I'm happy about a global script tag in the html page. This can be done in one of the components as part of the react application.
TBH I'm not too sure how many of those prevent default calls are needed, but I'm sure you have tested that. I haven't tested the pr yet, this comment is only about the code location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and seems to be working nicely, just +1 on Raanan that it would be better to have the event listener in a component instead of in a global script. graphEditor.tsx would be a good place.
The idea of the script on index.html was meant to overwrite the browser's default behavior as soon as the page is loaded, before the bundle is even loaded or any components are mounted. If the user zooms in before the page loads the whole JS bundle he will get stuck, the initial idea was to avoid it |
I would still prefer keeping implementation outside of index.html. There are many different reasons for that. The main one is the separation done between the static resources and the compiled resources. |
Done 👍 |
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://babylonsnapshots.z22.web.core.windows.net/refs/pull/12537/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/12537/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/12537/merge#BCU1XR#0 |
Before:
After: