-
Notifications
You must be signed in to change notification settings - Fork 45
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
Re-position 'highlightElement' on window resize #45
Re-position 'highlightElement' on window resize #45
Conversation
LGTM 👍 |
Thanks @loboulet looks good! Would you mind writing a small test to cover this functionality please? 😃 |
How would you like to test this functionality? The only case we can cover is to detect if the method is called on resize right? |
Yeah, I would probably test that it is called on resize and also test that the css is set correctly and the position of the highlightElement changes. |
Also, just curious, why do you need the copyStyles functionality @loboulet? I found I only needed it in very rare circumstances, and the normal highlight usually worked, without copying all the styles. |
@loboulet if you don't have time to write tests, I may be able to help. I'm just pretty swamped with other stuff right now. |
Hey, sorry I was out of town.
I have to highlight icons in the layout and I want them above the overlay
Yeah I could use some help. I have a lot on my plate right now too |
@loboulet no worries. So just using Just wanted to ensure the docs were clear enough on this and you weren't using I'll go ahead and merge these PRs and test them myself later then. |
Yeah everything seems clear to me.
|
Okay, just wanted to make sure it was necessary for your case. Sounds like it is. Thanks again for the PRs! |
No problem :) |
Create a method called
setPositionForHighlightElement
.createHighlightOverlay
to set the default position of the highlighted element.run.debounce
onresize
of the window to make sure the highlighted item is always at the same place and follows the viewport width.Relates to #16