create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 15 forks source link

refactor: Replace ResizeSensor with ResizeObserver #156

Closed gwhitney closed 1 year ago

gwhitney commented 1 year ago

In case it is of any help with #155, this PR represents starting with the current development branch, performing npm remove css-element-queries, deleting all occurrences of ResizeSensor and css-element-queries (they only occurred in src/x_ite.html and webpack.config.js anyway), correcting the casing of GifMedia.js in src/x_ite/Components/Texturing/MovieTexture.js (so that webpack will execute on Linux, which is case-sensitive), and then running make dist. The exact result of all that is committed in this PR.

I don't actually know that this is a reasonable change, but I thought I would provide it for your convenience. In particular, I couldn't find any sort of developer's guide among the documentation, so I wasn't sure what all to do to try out/test a change like this. I did try "make tests" but it did not run at all (even before I made any changes to the source).

Hope this helps in some way; looking forward to getting a version of x_ite that can be loaded in a browser extension.

gwhitney commented 1 year ago

OK, now the only occurrence of ResizeSensor has been replaced with a ResizeObserver, which has been standard in all major browsers for some time. Now this PR should be reasonable for testing and merging, to remove the dependency on ResizeSensor.js and eliminate its side effects (such as the need to use position: absolute for the private surface, which has also been removed in this PR). Let me know if there is anything else I can do to help support this change. Thanks!