new UWA.Controls.Ellipsis(element, options)
Display a web content through an iframe.
Parameters
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
element |
Element | The target element who contains a string to cut. Should be overflow: hidden; to avoid flashing effect when computing. |
||||||||||||||||||||
options |
Object | Options hash or a option/value pair. Properties
|
Extends
- UWA.Controls.Abstract
Index
Members
-
<protected> defaultOptions
-
Properties:
Name Type Description defaultOptions
Object The default controls options.
Methods
-
destroy()
-
Destroy this instance
-
onRefresh() → {Ellipsis}
-
Refresh the ellipsis posisition.
Returns
this Ellipsis
- Type
- Ellipsis
-
setWordCount(element, count) → {Number}
-
Set the number of words to display in an element.
Parameters
Name Type Description element
Element Targeted element
count
Integer Maximum number of words to set
Returns
Number of words set
- Type
- Number
-
computeData(element) → {Number}
-
Cache the words positions and the original text in the element tree
Parameters
Name Type Description element
DOMElement The root element
Returns
The total count of words
- Type
- Number