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 defaultOptionsObject 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 elementElement Targeted element
countInteger 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 elementDOMElement The root element
Returns
The total count of words
- Type
- Number