OverlayPanel centered

UI Components for Angular
Post Reply
Angelminster
Posts: 11
Joined: 23 Mar 2016, 00:02

09 Apr 2016, 17:26

Hi,

Is there an easy way to show an overlayPanel centered?

Thank you

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Apr 2016, 18:45

OverlayPanel is always positioned relative to its target, feel free to create a feature request though, it should be easy to implement.

Angelminster
Posts: 11
Joined: 23 Mar 2016, 00:02

09 Apr 2016, 20:09

It would be perfect if we can do something like

<p-overlayPanel [position]="bottom-center">
</p-overlayPanel>

top | bottom | rigth | left -> this will force the overlay panel to show there. This Feature is lesser important than the next one.
left | center | rigth -> this will "move" the overlay panel in X axys to display centered relative to its parent. rigth is your default value . Its like changing left attribute of ui-overlaypanel manually.

Thank you!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Apr 2016, 20:28

In your first post, so do you mean centered relative to its target, I thought you mean center of the window.

Angelminster
Posts: 11
Joined: 23 Mar 2016, 00:02

10 Apr 2016, 13:19

The window centered. This will be the second configuration part. Like this :
https://www.princeton.edu/nmc/nmckb/ima ... -Icons.png

This represents the first configurations options
https://i-msdn.sec.s-msft.com/dynimg/IC166312.png

When the "share" button is pulled rigth until the end of the screen the popup doesn't resize properly because the screen ends.
We want to configure the direction of the Overlaypanel growing . Beginning in the bottom-left relative to its button and increasing size to the left

This would be rigth-center
https://eclecticlightdotcom.files.wordp ... .jpg?w=940

Your overlay panel now shows top or botton (depends on the window space) and always rigth. The same but LEFT, growing to the left.

Regards

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Apr 2016, 10:12

Thank you for the feedback, please create a request at github.

kyriv
Posts: 8
Joined: 29 Feb 2016, 21:10

23 Sep 2016, 19:26

I used the following css class applied to the overlaypanel to center mine.

Code: Select all

.Centered {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

Code: Select all

<p:overlayPanel styleClass="Centered" ... >

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests