Skip to content
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

Proposal - add ability to determine actual position of popover #196

Open
nullifiedtsk opened this issue Nov 10, 2020 · 1 comment
Open

Comments

@nullifiedtsk
Copy link

It's a proposal.

Can you add the typings (or expose them) to the classList object of Popover component ?

Or maybe to add another property that will contain the actual values (not the passed xAlign/yAlign values, but calculated ones)?

This may be helpful when someone is replacing the styling of popup with custom template (with custom carets, baloons, e.t.c.), for, e.g. determination where caret should be located in some complex scenarios?

enum TooltipPositionClass {
  Before = 'sat-popover-before',
  After = 'sat-popover-after',
  Above = 'sat-popover-above',
  Below = 'sat-popover-below',
  Center = 'sat-popover-center',
}

interface SatTooltipPositioning {
  [TooltipPositionClass.Before]: boolean;
  [TooltipPositionClass.After]: boolean;
  [TooltipPositionClass.Above]: boolean;
  [TooltipPositionClass.Below]: boolean;
  [TooltipPositionClass.Center]: boolean;
}
@isaackehle
Copy link
Member

I'm good w/ that change. Can you submit a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants