14
14
//===================================================================================
15
15
16
16
/**
17
- *
17
+ * @public
18
+ * @desc build highLevelApi using the lowLevelApi as an input
19
+ * @module firefly
20
+ */
21
+
22
+ /**
18
23
* @param llApi the lowlevel api
19
24
* @return {Object }
25
+ * @ignore
26
+ *
20
27
*/
21
28
export function buildHighLevelApi ( llApi ) {
22
29
const current = build ( llApi ) ;
@@ -32,6 +39,7 @@ var globalImageViewDefParams= {};
32
39
* Build the deprecated API
33
40
* @param llApi
34
41
* @return {Object }
42
+ * @ignore
35
43
*/
36
44
function build ( llApi ) {
37
45
@@ -111,7 +119,9 @@ function buildTablePart(llApi) {
111
119
const { dispatchTableFetch} = llApi . action ;
112
120
113
121
/**
114
- * @typedef {object } TblOptions table options
122
+ * @global
123
+ * @public
124
+ * @typedef {object } TblOptions
115
125
* @prop {string } tbl_group the group this table belongs to. Defaults to 'main'.
116
126
* @prop {boolean } removable true if this table can be removed from view. Defaults to true.
117
127
* @prop {boolean } showUnits defaults to false
@@ -123,11 +133,14 @@ function buildTablePart(llApi) {
123
133
*/
124
134
125
135
/**
126
- * The general plotting function to plot a table.
127
136
* @param {string|HTMLDivElement } targetDiv to put the table in.
128
137
* @param {Object } request request object created from
129
138
* @param {TblOptions } options table options.
139
+ * @memberof module:firefly
140
+ * @public
141
+ * @example fierfly.showTable
130
142
*/
143
+ // @param {module:firefly.TblOptions } options table options.
131
144
const showTable = ( targetDiv , request , options ) => doShowTable ( llApi , targetDiv , request , options ) ;
132
145
133
146
return { showTable} ;
@@ -139,7 +152,9 @@ function buildTablePart(llApi) {
139
152
function buildChartPart ( llApi ) {
140
153
141
154
/**
142
- * @typedef {object } XYPlotOptions xy plot options
155
+ * @global
156
+ * @public
157
+ * @typedef {object } XYPlotOptions
143
158
* @prop {string } source location of the ipac table, url or file path; ignored when XY plot view is added to table
144
159
* @prop {string } QUERY_ID required when XY plot view is added to the table. It connects this XY Plot to the table and should be the same string that you specified as the div parameter when you created the table.
145
160
* @prop {string } chartTitle title of the chart
@@ -155,30 +170,36 @@ function buildChartPart(llApi) {
155
170
* @prop {string } yOptions comma separated list of y axis options: grid,flip,log
156
171
*/
157
172
173
+
158
174
/**
159
- * The general plotting function to plot an XY Plot.
175
+ * @summary The general plotting function to plot an XY Plot.
160
176
* @param {string|HTMLDivElement } targetDiv to put the chart in.
161
177
* @param {XYPlotOptions } parameters the request object literal with the chart parameters
162
- * @namespace firefly
178
+ * @memberof module:firefly
179
+ * @example firefly.showXYPlot
180
+ * @public
163
181
*/
164
182
const showXYPlot = ( targetDiv , parameters ) => doShowXYPlot ( llApi , targetDiv , parameters ) ;
165
-
166
183
/**
167
- * Add XY Plot view of an existing table.
184
+ * @summary It appears twice when it is added in the above jsdoc block
168
185
* @param {string|HTMLDivElement } targetDiv to put the chart in.
169
- * @param {XYPlotOptions } parameters the request object literal with the chart parameters
170
- * @namespace firefly
186
+ * @param {module:firefly.XYPlotOptions } parameters the request object literal with the chart parameters
187
+ * @memberof module:firefly
188
+ * @public
189
+ * @example firefly.addXYPlot
171
190
*/
191
+
172
192
const addXYPlot = ( targetDiv , parameters ) => doShowXYPlot ( llApi , targetDiv , parameters ) ;
173
193
174
194
return { showXYPlot, addXYPlot} ;
175
195
}
176
196
177
197
function buildCommon ( llApi ) {
178
198
/**
179
- * Sets the root path for any relative URL. If this method has not been called then relative URLs use the page's root.
199
+ * @summary Sets the root path for any relative URL. If this method has not been called then relative URLs use the page's root.
180
200
* @param {String } rootUrlPath
181
- * @namespace firefly
201
+ * @memberof module:firefly
202
+ * @public
182
203
*/
183
204
const setRootPath = ( rootUrlPath ) => llApi . action . dispatchRootUrlPath ( rootUrlPath ) ;
184
205
@@ -187,41 +208,60 @@ function buildCommon(llApi) {
187
208
188
209
function buildImagePart ( llApi ) {
189
210
211
+
190
212
const { RequestType} = llApi . util . image ;
191
213
192
- /**
193
- * The general plotting function to plot a FITS image.
194
- * @param {String|div } targetDiv to put the image in.
195
- * @param {Object } request the request object literal with the plotting parameters
196
- * @namespace firefly
214
+ /**
215
+ * @summary The general plotting function to plot a FITS image.
216
+ * @param {String|div } targetDiv to put the image in.
217
+ * @param {Object } request the request object literal with the plotting parameters
218
+ * @memberof module:firefly
219
+ * @public
220
+ * @ignore
221
+ * @example firefly.showImage
222
+ *
197
223
*/
198
224
const showImage = ( targetDiv , request ) => showImageInMultiViewer ( llApi , targetDiv , request ) ;
199
225
200
-
201
226
/**
202
- * a convenience plotting function to plot a file on the server or a url. If first looks for the file then
227
+ * @summary a convenience plotting function to plot a file on the server or a url. If first looks for the file then
203
228
* the url is the fallback
204
229
* @param {String|div } targetDiv to put the image in.
205
230
* @param {String } file file on server
206
231
* @param {String } url url reference to a fits file
207
- * @namespace firefly
232
+ * @memberof module:firefly
233
+ * @public
234
+ * @ignore
235
+ * @example firefly.showImageFileOrUrl
208
236
*/
237
+
209
238
const showImageFileOrUrl = ( targetDiv , file , url ) =>
210
239
showImageInMultiViewer ( llApi , targetDiv ,
211
240
{ 'File' : file ,
212
241
'URL' : url ,
213
242
'Type' : RequestType . TRY_FILE_THEN_URL
214
243
} ) ;
215
244
245
+
216
246
/**
217
- * set global fallback params for every image plotting call
247
+ * @summary set global fallback params for every image plotting call
218
248
* @param {Object } params a object literal such as any image plot or showImage uses
219
- * @namespace firefly
249
+ * @memberof module:firefly
250
+ * @public
251
+ * @ignore
252
+ * @example firefly.setGlobalImageDef
220
253
*/
221
254
const setGlobalImageDef = ( params ) => globalImageViewDefParams = params ;
222
255
223
256
224
-
257
+ /**
258
+ *
259
+ * @param {div } targetDiv to put the coverage in.
260
+ * @param options an object literal containing a list of the coverage options
261
+ * @memberof module:firefly
262
+ * @public
263
+ * @example firefly.showCoverage
264
+ */
225
265
const showCoverage = ( div , options ) => initCoverage ( llApi , div , options ) ;
226
266
227
267
return { showImage, showImageFileOrUrl, setGlobalImageDef, showCoverage} ;
@@ -232,6 +272,7 @@ function buildImagePart(llApi) {
232
272
* @param llApi
233
273
* @return {Object }
234
274
* @Deprecated
275
+ * @ignore
235
276
*/
236
277
function buildDeprecated ( llApi ) {
237
278
0 commit comments