Skip to content

Commit eae0cd1

Browse files
author
Lijun Zhang
committed
DM-7038: use the ink-docstrap as a template, finalized the jsdoc_config.json file, fixed the issue in firefly_api_overview.md so that all links are working
1 parent 2c54441 commit eae0cd1

File tree

12 files changed

+143
-125
lines changed

12 files changed

+143
-125
lines changed

docs/firefly-api-overview.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ More information about lower level API can be found here:
2929
- [Region Support](#region-support)
3030

3131

32-
###Starting Firefly Tools in JavaScript
32+
### Starting Firefly Tools in JavaScript
3333
Getting started with firefly tools involves three basic steps.
3434

3535
1. Load the javascript file `firefly_loader.js`
@@ -62,7 +62,7 @@ This is all best explained with a code example. This examples creates a div with
6262
</html>
6363
```
6464

65-
###Remote Firefly Tools Interface
65+
### Remote Firefly Tools Interface
6666

6767
The interface to remotely communicate to the firefly viewer:
6868

@@ -75,7 +75,7 @@ The interface to remotely communicate to the firefly viewer:
7575
| *return* | object | viewer interface |
7676

7777

78-
###Rendering UI components
78+
### Rendering UI components
7979

8080
Firefly React components can be found in `firefly.ui` module.
8181

@@ -94,7 +94,7 @@ Firefly React components can be found in `firefly.ui` module.
9494
| div | string or Object | a div element or a string id of the div element |
9595

9696

97-
###Dispatching and watching actions
97+
### Dispatching and watching actions
9898

9999
Firefly is built around [React](https://facebook.github.io/react/docs/why-react.html)/[Redux](http://redux.js.org) paradigm. The idea of React is that it will always render the state of your component.
100100
Redux manages that state of your application. The data in the state is immutable. It cannot change directly.
@@ -123,7 +123,7 @@ For example, action with type `READOUT_DATA` is dispatched with a function named
123123
| *return* | function | a function that will remove the listener |
124124

125125

126-
###Other Utility Methods
126+
### Other Utility Methods
127127

128128
The rest of Firefly utilities are split into the following modules by function:
129129

@@ -133,7 +133,7 @@ The rest of Firefly utilities are split into the following modules by function:
133133

134134

135135

136-
###FITS Visualization
136+
### FITS Visualization
137137

138138
A FITS image viewer is created by calling the following method:
139139

@@ -187,7 +187,7 @@ firefly.showImage('myDiv', {
187187
})
188188
```
189189

190-
###Deprecated ImageViewer interface
190+
### Deprecated ImageViewer interface
191191

192192
The following `ImageViewer` interface is deprecated. Please use `firefly.showImage()` instead
193193

@@ -207,7 +207,7 @@ Deprecated `ImageViewer` methods:
207207

208208

209209

210-
###Utility methods for FITS visualization
210+
### Utility methods for FITS visualization
211211

212212
#####**firefly.util.image.getPrimePlot** method
213213

@@ -292,7 +292,7 @@ To use minimal readout, do the following:
292292
);
293293
```
294294

295-
###Region Support
295+
### Region Support
296296

297297
#####**firefly.action.dispatchCreateRegionLayer** method
298298

@@ -360,7 +360,7 @@ function onFireflyLoaded() {
360360
```
361361

362362

363-
###Table Visualization
363+
### Table Visualization
364364

365365
Creating table request
366366

@@ -428,7 +428,7 @@ The Table tools currently supports the following file formats:
428428

429429

430430

431-
###XY Plot Visualization
431+
### XY Plot Visualization
432432

433433
- `firefly.showXYPlot(targetDiv, parameters)`
434434

@@ -465,7 +465,7 @@ XY Plot supports the same table formats as Table does:
465465
- FITS Tables
466466

467467

468-
###Connecting Coverage image to table
468+
### Connecting Coverage image to table
469469

470470
`firefly.showCoverage= (div,options)` - add a coverage image to a div
471471

@@ -515,7 +515,7 @@ firefly.showCoverage('coverage_div', {gridOn:true})
515515

516516

517517

518-
###Connecting XY Viewers to table
518+
### Connecting XY Viewers to table
519519

520520
`firefly.addXYPlot(targetDiv, parameters)` - add an XY Plot to a div
521521

@@ -549,6 +549,6 @@ tblReq = firefly.util.table.makeIrsaCatalogRequest('wise catalog', 'WISE', 'wise
549549
firefly.addXYPlot('xyplot_div', {tbl_id: tblReq.tbl_id, xCol: 'w1mpro+w4mpro', yCol: 'w2mpro'});
550550
```
551551

552-
###More Code Examples
552+
### More Code Examples
553553

554554
[see firefly-api-code-examples.md](firefly-api-code-examples.md)

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
"eslint-plugin-jsx-a11y": "^0.6.2",
8989
"jsdoc-jsx": "^0.1.0",
9090
"minami": "^1.1.1",
91-
"ink-docstrap" :"^1.2.1"
91+
"ink-docstrap" :"^1.2.1",
92+
"file-loader":"^0.09"
93+
9294
}
9395
}

src/firefly/js/api/ApiBuild.js

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,38 @@ import {buildViewerApi} from './ApiViewer.js';
4949
import './ApiStyle.css';
5050

5151

52+
/**
53+
* @namespace firefly
54+
*/
55+
/**
56+
* @namespace firefly.action
57+
* */
58+
/**
59+
* @namespace firefly.ui
60+
*
61+
*/
62+
/**
63+
* @namespace firefly.util
64+
*
65+
*/
66+
/**
67+
* @namespace firefly.util.chat
68+
*
69+
*/
70+
71+
/**
72+
* @namespace firefly.util.data
73+
*
74+
*/
75+
76+
/**
77+
* @namespace firefly.util.image
78+
* */
79+
80+
/**
81+
* @namespace firefly.util.table
82+
*/
83+
5284
/**
5385
* Start in api mode. Will create the api and call window.onFireflyLoaded(firefly)
5486
* @ignore
@@ -91,8 +123,6 @@ export function initApi() {
91123
}
92124
*/
93125

94-
95-
96126
/**
97127
* Return the api object.
98128
* @return {{action:{},ui:{},util:{}}}

src/firefly/js/api/ApiHighlevelBuild.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
/**
1717
* @public
1818
* @desc build highLevelApi using the lowLevelApi as an input
19-
* @namespace firefly
2019
*/
2120

2221
/**

src/firefly/js/api/ApiUtil.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {take,race,call} from 'redux-saga/effects';
2121
// NOTE
2222
/**
2323
* @public
24-
* @namespace firefly/util
2524
*/
2625
export {getBoolean} from '../util/WebUtil.js';
2726
export {toBoolean} from '../util/WebUtil.js';
@@ -32,7 +31,7 @@ export {toBoolean} from '../util/WebUtil.js';
3231
* @func isDebug
3332
* @static
3433
* @public
35-
* @memberof firefly/util
34+
* @memberof firefly.util
3635
*
3736
*/
3837
export const isDebug = () => get(window, 'firefly.debug', false);
@@ -42,7 +41,7 @@ export const isDebug = () => get(window, 'firefly.debug', false);
4241
* @param {String|Error} msg any number of messages
4342
* @public
4443
* @func debug
45-
* @memberof firefly/util
44+
* @memberof firefly.util
4645
*
4746
*/
4847
export function debug(...msg) {
@@ -57,7 +56,7 @@ export function debug(...msg) {
5756
* @param {Object} [props] props for the react component
5857
* @public
5958
* @function renderDOM
60-
* @memberof firefly/util
59+
* @memberof firefly.util
6160
*/
6261

6362
export function renderDOM(div, Component, props) {
@@ -83,7 +82,7 @@ export function renderDOM(div, Component, props) {
8382
* @param {string|Object} div a div element or a string id of the div element
8483
* @public
8584
* @function unrenderDOM
86-
* @memberof firefly/util
85+
* @memberof firefly.util
8786
*/
8887

8988
export function unrenderDOM(div) {
@@ -100,7 +99,7 @@ export function unrenderDOM(div) {
10099
* @return {function} a function that will remove the listener
101100
* @public
102101
* @func addActionListener
103-
* @memberof firefly/util
102+
* @memberof firefly.util
104103
*/
105104
export function addActionListener(actionType,callBack) {
106105
var pResolve;
@@ -128,7 +127,7 @@ export function addActionListener(actionType,callBack) {
128127
* @param getState a function get the application state
129128
* @private
130129
* @func actionReport
131-
* @memberof firefly/util
130+
* @memberof firefly.util
132131
*
133132
*/
134133
function *actionReport({actionType,callBack, cancelPromise},dispatch,getState) {

src/firefly/js/api/ApiUtilImage.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ const API_READOUT= 'apiReadout';
2828
// NOTE
2929
// NOTE
3030

31+
/**
32+
* @namespace firefly.util.image.CCUtil
33+
**/
34+
3135
/**
3236
* @public
33-
* @namespace firefly/util/image
3437
*
3538
*/
3639
export {RangeValues} from '../visualize/RangeValues.js';
@@ -56,7 +59,7 @@ export {watchImageMetaData} from '../visualize/saga/ImageMetaDataWatcher.js';
5659
* @returns {WebPlot}
5760
* @public
5861
* @function getPrimePlot
59-
* @memberof firefly/util/image
62+
* @memberof firefly.util.image
6063
*
6164
*/
6265
export function getPrimePlot(plotId) {
@@ -69,7 +72,7 @@ export function getPrimePlot(plotId) {
6972
* @param {object} props - a list of the properties
7073
* @public
7174
* @function initAutoReadout
72-
* @memberof firefly/util/image
75+
* @memberof firefly.util.image
7376
*/
7477
export function initAutoReadout(ReadoutComponent= DefaultApiReadout,
7578
// props={MouseReadoutComponent:PopupMouseReadoutMinimal, showThumb:false,showMag:false}){
@@ -88,7 +91,7 @@ export function initAutoReadout(ReadoutComponent= DefaultApiReadout,
8891
* @param algorithm the stretch algorithm to use, may be 'Linear', 'Log', 'LogLog', 'Equal', 'Squared', 'Sqrt'
8992
* @public
9093
* @function serializeSimpleRangeValues
91-
* @memberof firefly/util/image
94+
* @memberof firefly.util.image
9295
*/
9396
export function serializeSimpleRangeValues(stretchType,lowerValue,upperValue,algorithm) {
9497
const rv= RangeValues.makeSimple(stretchType,lowerValue,upperValue,algorithm);

src/firefly/js/api/ApiViewer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
/**
77
* @public
88
* @summary Build the interface to remotely communicate to the firefly viewer
9-
* @namespace firefly
109
*/
1110
import {take} from 'redux-saga/effects';
1211
import {isArray, get} from 'lodash';

src/firefly/js/charts/XYPlotCntlr.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const SET_ZOOM = `${XYPLOT_DATA_KEY}/SET_ZOOM`;
2626
const RESET_ZOOM = `${XYPLOT_DATA_KEY}/RESET_ZOOM`;
2727
/**
2828
* @public
29-
* @namespace firefly/action
3029
*/
3130

3231
/*
@@ -83,7 +82,7 @@ const RESET_ZOOM = `${XYPLOT_DATA_KEY}/RESET_ZOOM`;
8382
* @param {function} dispatcher only for special dispatching uses such as remote
8483
* @public
8584
* @function dispatchLoadPlotData
86-
* @memberof firefly/action
85+
* @memberof firefly.action
8786
*
8887
*/
8988
export function dispatchLoadPlotData(chartId, xyPlotParams, tblId, dispatcher= flux.process) {
@@ -96,7 +95,7 @@ export function dispatchLoadPlotData(chartId, xyPlotParams, tblId, dispatcher= f
9695
* @param {Object} selection - {xMin, xMax, yMin, yMax}
9796
* @public
9897
* @func dispatchSetSelection
99-
* @memberof firefly/action
98+
* @memberof firefly.action
10099
*/
101100
export function dispatchSetSelection(chartId, selection) {
102101
flux.process({type: SET_SELECTION, payload: {chartId, selection}});
@@ -109,7 +108,7 @@ export function dispatchSetSelection(chartId, selection) {
109108
* @param {Object} selection - {xMin, xMax, yMin, yMax}
110109
* @public
111110
* @func dispatchZoom
112-
* @memberof firefly/action
111+
* @memberof firefly.action
113112
*/
114113
export function dispatchZoom(chartId, tblId, selection) {
115114
const {xyPlotData, xyPlotParams, decimatedUnzoomed} = get(getChartSpace(SCATTER), chartId, {});
@@ -155,7 +154,7 @@ function dispatchResetZoom(chartId) {
155154
* @returns function which loads plot data (x, y, rowIdx, etc.)
156155
* @public
157156
* @func loadPlotData
158-
* @memberof firefly/action
157+
* @memberof firefly.action
159158
*/
160159
export function loadPlotData (rawAction) {
161160
return (dispatch) => {
@@ -206,7 +205,7 @@ function serverParamsChanged(oldParams, newParams) {
206205
* decimatedUnzoomed - tells if unzoomed data are decimated
207206
* @param data {Object} the data to merge with the xyplot branch
208207
* @returns {{type: string, payload: object}}
209-
* @memberof firefly/action
208+
* @memberof firefly.action
210209
* @public
211210
* @func updatePlotData
212211
*/

0 commit comments

Comments
 (0)