-
Notifications
You must be signed in to change notification settings - Fork 8
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
[🚀 ESL Popup] add position-origin attribute #2747
Conversation
break; | ||
case 'right': | ||
x = inner.right; | ||
x = hasInnerOrigin ? inner.x : inner.right; |
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.
Just a note: probably we can use left
/right
key and some generic function for invertion in future
@@ -401,10 +407,11 @@ export class ESLPopup extends ESLToggleable { | |||
const triggerRect = Rect.from(this.activator).shift(window.scrollX, window.scrollY); | |||
const {containerRect} = this; | |||
|
|||
const innerMargin = this._offsetTrigger + arrowRect.width / 2; | |||
const innerMargin = this._offsetTrigger + (this.positionOrigin === 'inner' ? 0 : arrowRect.width / 2); |
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.
Do we need? Practically there is no limitation to have arrow for inner behaviour
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.
This is not a limitation. This is just a position adjustment.
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.
We need to think of optimization of these utils...
I'm going to create a few issues to this |
Co-authored-by: Anna Barmina <[email protected]>
🎉 This PR is included in version 5.0.0-beta.39 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Added a new attribute
position-origin="outer|inner"
that allows or disallows to overlap of the trigger by a popup window.Closes: #2746