Extends
Members
columns :Array.<dictionary>
Defines the title, type, width in pixels, name and read/writability of the jexcel sheet's columns.
Type:
- Array.<dictionary>
mode
A mutator defining the kind of subclass.
- Overrides:
- Source:
Methods
a2O(a) → {dictionary}
Utility. Transforms an array into a dictionary. The values are taken in a, the keys in this.fieldnames
Requires that condition is that a and fieldnames have the same length. Otherwise an empty dictionary
is returned.
Parameters:
Name | Type | Description |
---|---|---|
a |
Array.<any> |
Returns:
- Type
- dictionary
b4change(sheet, cell, x, y, value)
Callback. Defines the onbeforechange behaviour (i.e. just before a change is performed).
Parameters:
Name | Type | Description |
---|---|---|
sheet |
jexcel-sheet | not used in this implementation |
cell |
jexcel-row | not used in this implementation |
x |
number | not used in this implementation |
y |
number | not used in this implementation |
value |
any | not used in this implementation |
changed(sheet, cell, x, y, value)
Callback. Defines the onchange behaviour (i.e. just when a change occurred).
Parameters:
Name | Type | Description |
---|---|---|
sheet |
jexcel-sheet | the sheet where change occurred |
cell |
jexcel-cell | the cell where change occurred |
x |
number | the column number |
y |
number | the row number |
value |
any | the new value |
checkDEC(DECText) → {dictionary}
Utility. Check that a string expresses correctly a Declination.
Parameters:
Name | Type | Description |
---|---|---|
DECText |
string |
Returns:
a dictionary { degree:.., minute:..., second:..., decdegree:... } if yes and null if no (decdegree === decimale degree)
- Type
- dictionary
checkRA(RAText)
Utility. Check that a string expresses correctly a Right Ascension.
Parameters:
Name | Type | Description |
---|---|---|
RAText |
string |
Returns:
checkRADEC(RAText, DECText) → {dictionary}
Utility. Check that a pair of string expresses correctly a pair (Right Ascension, Declination)
Parameters:
Name | Type | Description |
---|---|---|
RAText |
string | |
DECText |
string |
Returns:
a dictionary { RA: result of checkRA(RAText), DEC: result of checkDEC(DECText)}
- Type
- dictionary
close()
Close this factory. Disable its interaction processor.
- Overrides:
- Source:
createJexcel(parentId)
Creates an empty jexcel sheet and defines its behaviour.
- The sheet will be a child of parentId.
- Its columns are defined by MarkersFactory's columns member
Parameters:
Name | Type | Description |
---|---|---|
parentId |
string | the id of parent element. |
deleteMarkerFeatures(arrayOfFeatures)
Utility. Delete OpenLayers features representing markers.
Parameters:
Name | Type | Description |
---|---|---|
arrayOfFeatures |
Array.<feature> | the features to delete |
deleteSelectedMarkers()
Callback. Defines the ondeleterow behaviour.
format(floatValue) → {string}
Utility. Format the textual expression of a float number.
Parameters:
Name | Type | Description |
---|---|---|
floatValue |
number |
Returns:
a string as produced by toExponential(4)
- Type
- string
getAllMarkerFeatures() → {Array.<feature>}
Utility. Return an array of all the OpenLayers features representing markers.
Returns:
- Type
- Array.<feature>
getButtonObject() → {button}
Utility. Returns the toolbox button that will activate this instance.
Returns:
- Type
- button
getDataAsJSON() → {Array.<dictionary>}
Utility. Transforms a jexcel spreadsheet as returned by getData, i.e. an array of arrays, into an array of dictionaries.
Returns:
- Type
- Array.<dictionary>
getMarkersList()
Returns an array of objects representing markers with all their properties
Returns:
array
getPixelValuePromise(iRA, iDEC, relFITSFilePath)
Promise. Connect the get pixel value asynchronous calls
with the consumer of the result to these calls.
Parameters:
Name | Type | Description |
---|---|---|
iRA |
number | the integer first coordinate of the pixel of interest |
iDEC |
number | the integer second coordinate of the pixel of interest |
relFITSFilePath |
string | the FITS file path |
hide()
Hide all the objects created by one subclass. (e.g. all the markers)
- Overrides:
- Source:
jexcel2OL()
Utility. Produces a graphic representation of the collection of markers from the content of the jexcel sheet.
(Jexcel to OpenLayers)
loaded()
Callback. Defines the onload behaviour (i.e. setData).
markersCount()
Returns:
a button
noteSelectedRows(sheet, x1, y1, x2, y2)
Callback. Defines the onselection behaviour
of the spreadsheet after some selection has been performed. Here the 'id' field(s) of the selected row(s) are recorded.
Parameters:
Name | Type | Description |
---|---|---|
sheet |
jexcel-sheet | |
x1 |
number | |
y1 |
number | |
x2 |
number | |
y2 |
number |
open(interaction, cursor)
Behaviour when an instance is activated.
Parameters:
Name | Type | Description |
---|---|---|
interaction |
Interaction | |
cursor |
cursor |
- Overrides:
- Source:
- See:
recordMarker(event, flux)
Utility. Record a new marker after a click on the graphic interface.
Both graphic and jexcel interfaces are updated.
Parameters:
Name | Type | Description |
---|---|---|
event |
event | the click event that triggers the marker's creation |
flux |
dictionary | a dictionary {"value":.., "unit":..., "type:..."} |
remove(feature)
Remove one object created by a subclass.
Parameters:
Name | Type | Description |
---|---|---|
feature |
* | the object to remove. |
- Overrides:
- Source:
removeFromJExcel(markerFeature)
Utility. Removes a marker, i.e. one row, from the jexcel sheet given its OpenLayers counterpart (feature).
Parameters:
Name | Type | Description |
---|---|---|
markerFeature |
feature |
selected(feature)
Modify the look of feature to show that it's been selected. ( e.g. highlite it )
Parameters:
Name | Type | Description |
---|---|---|
feature |
An instance created by a subclass |
- Overrides:
- Source:
setId(sheet, rowNumber, numOfRows, rowRecords, insertBefore)
Callback. Defines the oninsertrow behaviour
once a new (empty) row has been inserted. Here the 'id' of that row is forced to -1.
Parameters:
Name | Type | Description |
---|---|---|
sheet |
jexcel-sheet | not used in this implementation |
rowNumber |
number | the index number of the row to be inserted. |
numOfRows |
number | not used in this implementation |
rowRecords |
number | not used in this implementation |
insertBefore |
boolean | how the insertion is performed. |
show()
Make visible all the objects created by one subclass. (e.g. all the markers)
- Overrides:
- Source:
unselected(feature)
Modify the look of feature to show that it's been unselected. ( e.g. display it normally )
Parameters:
Name | Type | Description |
---|---|---|
feature |
an instance created by a subclass. |
- Overrides:
- Source:
validateRow(row) → {boolean}
Utility. Checks the content of a row considered as a dictionary. Here it verifies
that RA and DEC fields are valid strings to express right ascension and declination.
Parameters:
Name | Type | Description |
---|---|---|
row |
dictionary |
Returns:
- Type
- boolean