Object for configuring the position of the panel.
MdPanelPosition.absolute();
Positions the panel absolutely relative to the parent element. If the parent is document.body, this is equivalent to positioning the panel absolutely within the viewport.
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.relativeTo(element);
Positions the panel relative to a specific element.
| Parameter | Type | Description |
|---|---|---|
* element
stringElementangular.JQLite
|
stringElementangular.JQLite |
Query selector, DOM element, or angular element to position the panel with respect to. |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.top([top]);
Sets the value of top for the panel. Clears any previously set vertical
position.
| Parameter | Type | Description |
|---|---|---|
top
string
|
string |
Value of |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.bottom([bottom]);
Sets the value of bottom for the panel. Clears any previously set vertical
position.
| Parameter | Type | Description |
|---|---|---|
bottom
string
|
string |
Value of |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.start([start]);
Sets the panel to the start of the page - left if ltr or right for
rtl. Clears any previously set horizontal position.
| Parameter | Type | Description |
|---|---|---|
start
string
|
string |
Value of position. Defaults to '0'. |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.end([end]);
Sets the panel to the end of the page - right if ltr or left for rtl.
Clears any previously set horizontal position.
| Parameter | Type | Description |
|---|---|---|
end
string
|
string |
Value of position. Defaults to '0'. |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.left([left]);
Sets the value of left for the panel. Clears any previously set
horizontal position.
| Parameter | Type | Description |
|---|---|---|
left
string
|
string |
Value of |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.right([right]);
Sets the value of right for the panel. Clears any previously set
horizontal position.
| Parameter | Type | Description |
|---|---|---|
right
string
|
string |
Value of |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.centerHorizontally();
Centers the panel horizontally in the viewport. Clears any previously set horizontal position.
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.centerVertically();
Centers the panel vertically in the viewport. Clears any previously set vertical position.
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.center();
Centers the panel horizontally and vertically in the viewport. This is
equivalent to calling both centerHorizontally and centerVertically.
Clears any previously set horizontal and vertical positions.
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.addPanelPosition(xPosition, yPosition);
Sets the x and y position for the panel relative to another element. Can be called multiple times to specify an ordered list of panel positions. The first position which allows the panel to be completely on-screen will be chosen; the last position will be chose whether it is on-screen or not.
xPosition must be one of the following values available on $mdPanel.xPosition:
CENTER | ALIGN_START | ALIGN_END | OFFSET_START | OFFSET_END
************* * * * PANEL * * * ************* A B C D E A: OFFSET_START (for LTR displays) B: ALIGN_START (for LTR displays) C: CENTER D: ALIGN_END (for LTR displays) E: OFFSET_END (for LTR displays)
yPosition must be one of the following values available on $mdPanel.yPosition:
CENTER | ALIGN_TOPS | ALIGN_BOTTOMS | ABOVE | BELOW
F
G *************
* *
H * PANEL *
* *
I *************
J
F: BELOW
G: ALIGN_TOPS
H: CENTER
I: ALIGN_BOTTOMS
J: ABOVE
| Parameter | Type | Description |
|---|---|---|
* xPosition
string
|
string |
|
* yPosition
string
|
string |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.withOffsetX(offsetX);
Sets the value of the offset in the x-direction.
| Parameter | Type | Description |
|---|---|---|
* offsetX
string
|
string |
| Returns | Description |
|---|---|
MdPanelPosition |
MdPanelPosition.withOffsetY(offsetY);
Sets the value of the offset in the y-direction.
| Parameter | Type | Description |
|---|---|---|
* offsetY
string
|
string |
| Returns | Description |
|---|---|
MdPanelPosition |