popover icon indicating copy to clipboard operation
popover copied to clipboard

Proposal - add ability to determine actual position of popover

Open nullifiedtsk opened this issue 3 years ago • 1 comments

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;
}

nullifiedtsk avatar Nov 10 '20 14:11 nullifiedtsk

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

isaackehle avatar Nov 23 '20 18:11 isaackehle