Constructor
new SourceTable(table_target, table_title, spectroUI)
Parameters:
Name | Type | Description |
---|---|---|
table_target |
string | DOM element containing the table |
table_title |
string | Title of the table |
spectroUI |
object | spectroscopy user interface |
Methods
_buildDLInfo(source)
Builds the content of the container displaying link to NED DL page
for this source
Parameters:
Name | Type | Description |
---|---|---|
source |
object | a source name |
Returns:
DOMElement
_buildSourceInfo(source)
Builds the content of the container displaying the source infos
Parameters:
Name | Type | Description |
---|---|---|
source |
object | a source name |
Returns:
DOMElement
_executeListeners(event)
Calls all the registered listeners
Parameters:
Name | Type | Description |
---|---|---|
event |
contains values of redshift, velocity, ra, dec |
_getDataCell(data)
Returns a TD DOM element
Parameters:
Name | Type | Description |
---|---|---|
data |
string |
_getDataTable() → {object}
Returns rows of HTML table and the metadata associated to each row.
Additional metadata are calculated if z > Constants.MIN_REDSHIFT_FOR_CALC
(scale in kpc, distance in Mpc, * z age in Gyr, luminosity distance in Mpc)
Returns:
{"table" : [], "data" : []}
- Type
- object
_getDistanceLink(source)
Returns a link to the NED page listing distances for a source
Parameters:
Name | Type | Description |
---|---|---|
source |
object | source name |
Returns:
url
_getHyperlinkCell(link, text)
Returns a TD DOM element containing a hyperlink
Parameters:
Name | Type | Description |
---|---|---|
link |
string | |
text |
string |
_getNedTapUrl(RA, DEC) → {string}
Returns a TAP request to NED service
Parameters:
Name | Type | Description |
---|---|---|
RA |
float | |
DEC |
float |
Returns:
query url
- Type
- string
_getNedWebUrl(RA, DEC) → {string}
Returns a cone search request to NED service
Parameters:
Name | Type | Description |
---|---|---|
RA |
float | |
DEC |
float |
Returns:
query url
- Type
- string
_getTable(rows) → {domElement}
Returns a HTML table element with all its rows in tbody
Parameters:
Name | Type | Description |
---|---|---|
rows |
* |
Returns:
- Type
- domElement
_getTableHeader(content)
Returns a TH DOM element
Parameters:
Name | Type | Description |
---|---|---|
content |
string |
_onClick(event)
Event triggered when a TR element is clicked
It is propagated to all entries in this.selectionListeners
Parameters:
Name | Type | Description |
---|---|---|
event |
* |
_setDlWarning(message)
Displays a message in the dedicated area in title div
Parameters:
Name | Type | Description |
---|---|---|
message |
string | displayed message |
_setTitle(RA, DEC, radius)
Fills the title area of the sources container
Parameters:
Name | Type | Description |
---|---|---|
RA |
float | |
DEC |
float | |
radius |
float |
_showResult(RA, DEC)
Displays the result table or a warning message if no result has been found
Parameters:
Name | Type | Description |
---|---|---|
RA |
float | |
DEC |
float |
_showSpinner()
Shows a spinner image indicating that the UI is busy
_writeInfoMessage(text)
Add a SPAN element with a text message inside the DOM element containing the results
Parameters:
Name | Type | Description |
---|---|---|
text |
string |
addListener(listener)
Adds a new listener to the list
Parameters:
Name | Type | Description |
---|---|---|
listener |
object |
getSources(RA, DEC, radius)
Gets sources at RA/DEC/radius from NED catalog
Parameters:
Name | Type | Description |
---|---|---|
RA |
* | |
DEC |
* | |
radius |
* | in degrees |
removeListener(listener)
Removes a listener
Parameters:
Name | Type | Description |
---|---|---|
listener |
object |