Class type Ext_util_Positionable.t


class type t = object .. end
Inherits
method alignTo : 'a 'b.
'a Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'b Js.t Js.optdef ->
(< alignTo : 'a 'b. 'c;
anchorTo : 'e 'f 'g 'h.
'e Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'f Js.t Js.optdef ->
'g Js.t Js.optdef ->
'h Js.callback Js.optdef -> 'd Js.t Js.meth;
calculateConstrainedPosition : 'i.
'i Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t
Js.optdef ->
bool Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t
Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
callParent : 'j 'k. 'j Js.t -> 'k Js.t Js.meth;
callSuper : 'l 'm. 'l Js.t -> 'm Js.t Js.meth;
getAlignToXY : 'n.
'n Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getAnchorXY : 'o.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef ->
'o Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth;
getBox : 'p.
bool Js.t Js.optdef -> bool Js.t Js.optdef -> 'p Js.t Js.meth;
getConstrainVector : 'q 'r.
'q Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'r Js.t Js.meth;
getInitialConfig : 's. Js.js_string Js.t Js.optdef -> 's Js.t Js.meth;
getLocalX : Js.number Js.t Js.meth;
getLocalXY : Js.number Js.t Js.js_array Js.t Js.meth;
getLocalY : Js.number Js.t Js.meth;
getOffsetsTo : 't. 't Js.t -> Js.number Js.t Js.js_array Js.t Js.meth;
getRegion : Ext_util_Region.t Js.t Js.meth;
getViewRegion : Ext_util_Region.t Js.t Js.meth;
getX : Js.number Js.t Js.meth;
getXY : Js.number Js.t Js.js_array Js.t Js.meth;
getY : Js.number Js.t Js.meth;
initConfig : 'u. 'u Js.t -> 'd Js.t Js.meth;
move : 'v.
Js.js_string Js.t ->
Js.number Js.t -> 'v Js.t Js.optdef -> unit Js.meth;
removeAnchor : 'd Js.t Js.meth; self : Ext_Class.t Js.t Js.prop;
setBox : 'w 'x. 'w Js.t -> 'x Js.t Js.optdef -> 'd Js.t Js.meth;
setLocalX : Js.number Js.t -> 'd Js.t Js.meth;
setLocalXY : 'y. 'y Js.t -> Js.number Js.t Js.optdef -> 'd Js.t Js.meth;
setLocalY : Js.number Js.t -> 'd Js.t Js.meth;
setRegion : 'z.
Ext_util_Region.t Js.t ->
'z Js.t Js.optdef -> 'd Js.t Js.meth;
setX : 'a1. Js.number Js.t -> 'a1 Js.t Js.optdef -> 'd Js.t Js.meth;
setXY : 'b1.
Js.number Js.t Js.js_array Js.t ->
'b1 Js.t Js.optdef -> 'd Js.t Js.meth;
setY : 'c1. Js.number Js.t -> 'c1 Js.t Js.optdef -> 'd Js.t Js.meth;
statics : Ext_Class.t Js.t Js.meth;
translatePoints : 'd1 'e1.
'd1 Js.t ->
Js.number Js.t Js.optdef -> 'e1 Js.t Js.meth;
.. >
as 'd)
Js.t Js.meth as 'c

Aligns the element with another element relative to the specified anchor points. If the other element is the document it aligns it to the viewport. The position parameter is optional, and can be specified in any one of the following formats:

In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than that specified in order to enforce the viewport constraints. Following are all of the supported anchor positions:

Value  Description
-----  -----------------------------
tl     The top left corner (default)
t      The center of the top edge
tr     The top right corner
l      The center of the left edge
c      In the center of the element
r      The center of the right edge
bl     The bottom left corner
b      The center of the bottom edge
br     The bottom right corner

Example Usage:

// align el to other-el using the default positioning
// ("tl-bl", non-constrained)
el.alignTo("other-el");

// align the top left corner of el with the top right corner of other-el
// (constrained to viewport)
el.alignTo("other-el", "tr?");

// align the bottom right corner of el with the center left edge of other-el
el.alignTo("other-el", "br-l?");

// align the center of el with the bottom left corner of other-el and
// adjust the x position by -6 pixels (and the y position by 0)
el.alignTo("other-el", "c-bl", [-6, 0]);

Parameters:

Returns:


method anchorTo : 'e 'f 'g 'h.
'e Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
'f Js.t Js.optdef ->
'g Js.t Js.optdef -> 'h Js.callback Js.optdef -> 'd Js.t Js.meth

Anchors an element to another element and realigns it when the window is resized.

Parameters:

Returns:


method calculateConstrainedPosition : 'i.
'i Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
bool Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth

Calculates the new [x,y] position to move this Positionable into a constrain region.

By default, this Positionable is constrained to be within the container it was added to, or the element it was rendered to.

Priority is given to constraining the top and left within the constraint.

An alternative constraint may be passed.

Parameters:

Returns:


method getAlignToXY : 'n.
'n Js.t ->
Js.js_string Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.meth

Gets the x,y coordinates to align this element with another element. See alignTo for more info on the supported position values.

Parameters:

Returns:


method getAnchorXY : 'o.
Js.js_string Js.t Js.optdef ->
bool Js.t Js.optdef ->
'o Js.t Js.optdef -> Js.number Js.t Js.js_array Js.t Js.meth

Gets the x,y coordinates specified by the anchor position on the element.

Parameters:

Returns:


method getBox : 'p. bool Js.t Js.optdef -> bool Js.t Js.optdef -> 'p Js.t Js.meth

Return an object defining the area of this Element which can be passed to setBox to set another Element's size/location to match this element.

Parameters:

Returns:


method getConstrainVector : 'q 'r.
'q Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef ->
Js.number Js.t Js.js_array Js.t Js.optdef -> 'r Js.t Js.meth

Returns the [X, Y] vector by which this Positionable's element must be translated to make a best attempt to constrain within the passed constraint. Returns false if the element does not need to be moved.

Priority is given to constraining the top and left within the constraint.

The constraint may either be an existing element into which the element is to be constrained, or a Region into which this element is to be constrained.

By default, any extra shadow around the element is not included in the constrain calculations - the edges of the element are used as the element bounds. To constrain the shadow within the constrain region, set the constrainShadow property on this element to true.

Parameters:

Returns:


method getLocalX : Js.number Js.t Js.meth

Returns the x coordinate of this element reletive to its offsetParent.

Returns:


method getLocalXY : Js.number Js.t Js.js_array Js.t Js.meth

Returns the x and y coordinates of this element relative to its offsetParent.

Returns:


method getLocalY : Js.number Js.t Js.meth

Returns the y coordinate of this element reletive to its offsetParent.

Returns:


method getOffsetsTo : 't. 't Js.t -> Js.number Js.t Js.js_array Js.t Js.meth

Returns the offsets of this element from the passed element. The element must both be part of the DOM tree and not have display:none to have page coordinates.

Parameters:

Returns:


method getRegion : Ext_util_Region.t Js.t Js.meth

Returns a region object that defines the area of this element.

Returns:


method getViewRegion : Ext_util_Region.t Js.t Js.meth

Returns the content region of this element. That is the region within the borders and padding.

Returns:


method getX : Js.number Js.t Js.meth

Gets the current X position of the DOM element based on page coordinates.

Returns:


method getXY : Js.number Js.t Js.js_array Js.t Js.meth

Gets the current position of the DOM element based on page coordinates.

Returns:


method getY : Js.number Js.t Js.meth

Gets the current Y position of the DOM element based on page coordinates.

Returns:


method move : 'v. Js.js_string Js.t -> Js.number Js.t -> 'v Js.t Js.optdef -> unit Js.meth

Move the element relative to its current position.

Parameters:


method removeAnchor : 'd Js.t Js.meth

Remove any anchor to this element. See anchorTo.

Returns:


method setBox : 'w 'x. 'w Js.t -> 'x Js.t Js.optdef -> 'd Js.t Js.meth

Sets the element's box. If animate is true then x, y, width, and height will be animated concurrently.

Parameters:

Returns:


method setLocalX : Js.number Js.t -> 'd Js.t Js.meth

Sets the local x coordinate of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalX, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setLocalXY : 'y. 'y Js.t -> Js.number Js.t Js.optdef -> 'd Js.t Js.meth

Sets the local x and y coordinates of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalXY, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setLocalY : Js.number Js.t -> 'd Js.t Js.meth

Sets the local y coordinate of this element using CSS style. When used on an absolute positioned element this method is symmetrical with getLocalY, but may not be symmetrical when used on a relatively positioned element.

Parameters:

Returns:


method setRegion : 'z. Ext_util_Region.t Js.t -> 'z Js.t Js.optdef -> 'd Js.t Js.meth

Sets the element's position and size to the specified region. If animation is true then width, height, x and y will be animated concurrently.

Parameters:

Returns:


method setX : 'a1. Js.number Js.t -> 'a1 Js.t Js.optdef -> 'd Js.t Js.meth

Sets the X position of the DOM element based on page coordinates.

Parameters:

Returns:


method setXY : 'b1. Js.number Js.t Js.js_array Js.t -> 'b1 Js.t Js.optdef -> 'd Js.t Js.meth

Sets the position of the DOM element in page coordinates.

Parameters:

Returns:


method setY : 'c1. Js.number Js.t -> 'c1 Js.t Js.optdef -> 'd Js.t Js.meth

Sets the Y position of the DOM element based on page coordinates.

Parameters:

Returns:


method translatePoints : 'd1 'e1. 'd1 Js.t -> Js.number Js.t Js.optdef -> 'e1 Js.t Js.meth

Translates the passed page coordinates into left/top css values for the element

Parameters:

Returns: