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
set up js dom for getBoundingClientRect() #1590
Comments
@domenic i have component , when i move mouse to bottom of component , i wait that my component show buttop , and it bount to |
jsdom doesn't do any rendering, so |
You can assume the .getBoundingClientRect() API works and do the following:
|
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> Refactor 2 very simple util file tests. `DomUtils` and `LogUtils` * add one new test for DomUtils * remove old files * Note: DomUtils has some drawbacks with `jsdom` not being able to actually get back client width and height jsdom/jsdom#1590 (comment) ## Related Issue N/A - Jest Migration ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> Migrate karma tests to Jest ## How Has This Been Tested? `npm run test` - all tests succeed ## Screenshots (if appropriate): N/A ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Refactor - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [x] I have added tests to cover my changes. - [x] All new and existing tests passed. Co-authored-by: Coltin Kifer <ckifer@amazon.com>
Update, I think using the way below is more suitable.
If you want to set it for a table element, just need to use |
maybe somebody setups jsdom that it work with getBoundingClientRect() , i work with simulantjs and my console log back this->
maybe someone has ideas??
The text was updated successfully, but these errors were encountered: