graphics.ext.Element.Position_ Extends
Manages a position and size, either horizontal or vertical.

Inheritance

Constructor

goog.graphics.ext.Element.Position_(elementhorizontal)

Parameters

element : goog.graphics.ext.Element
The element the position applies to.
horizontal : boolean
Whether the position is horizontal or vertical.

Instance Methods

Public Protected Private
getCoordinateCache_() !Object
No description.
Returns: !Object  The coordinate value computation cache.
code »
getEnd() number
No description.
Returns: number  The end coordinate of the element, in units of the parent's coordinate system.
code »
getMaxPosition() number
No description.
Returns: number  An estimate of the maximum x/y extent this element would have in a parent of no width/height.
code »
getMiddle() number
No description.
Returns: number  The middle coordinate of the element, in units of the parent's coordinate system.
code »
getMinSize() number
No description.
Returns: number  The minimum width/height of the element.
code »
getParentSize_() number
No description.
Returns: number  The size of the parent's coordinate space.
code »
getSize() number
No description.
Returns: number  The width/height of the element.
code »
getStart() number
No description.
Returns: number  The distance from the left/top edge of this element to the left/top edge of its parent, specified in units of the parent's coordinate system.
code »
getValue_(vopt_forMaximum) number
Converts the given x coordinate to a number value in units.
Arguments:
v : string | number
The coordinate to retrieve the value for.
opt_forMaximum : boolean=
Whether we are computing the largest value this coordinate would be in a parent of no size.
Returns: number  The correct number of coordinate space units.
code »
isParentDependent() boolean
No description.
Returns: boolean  Whether the size or position of this element depends on the size of the parent element.
code »
resetCache()
Resets the caches of position values and coordinate values.
code »
setMinSize(minSize)
Sets the minimum width/height of the element.
Arguments:
minSize : string | number
The minimum width/height of the element.
code »
setPosition(valuetype)
Sets the position, either as a left/top, center/middle, or right/bottom value.
Arguments:
value : number | string
The value of the coordinate.
type : goog.graphics.ext.Element.PositionType_
The type of the coordinate.
code »
setSize(size) boolean
Sets the width/height of the element.
Arguments:
size : string | number
The width/height of the element.
Returns: boolean  Whether the value was changed.
code »

Instance Properties

cachedValue_ :
The lazy loaded distance from the parent's top/left edge to this element's top/left edge expressed in the parent's coordinate system. We cache this because it is most freqeuently requested by the element and it is easy to compute middle and end values from it.
Code »
coordinateCache_ :
A cache of computed x coordinates.
Code »
distanceType_ :
The coordinate type specified by distance_.
Code »
distance_ :
The coordinate of this object, as specified by the caller. The type of coordinate is specified by distanceType_.
Code »
No description.
Code »
horizontal_ :
No description.
Code »
minSize_ :
The minimum width/height of this element, as specified by the caller.
Code »
size_ :
The width/height of this object, as specified by the caller.
Code »

Package graphics.ext.Element

Package Reference