You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to dispatch and listen to Firefly actions makes it possible to write new code, which could control or interact with Firefly widgets.
107
+
Being able to dispatch Firefly actions and listen to them makes it possible to write new code, which could control Firefly widgets or interact with them.
108
+
109
+
An external script would trigger UI change by calling an action dispatcher and react to UI action by adding a listener to this action.
`firefly.util.image.serializeSimpleRangeValues(stretchType,lowerValue,upperValue,algorithm)` - serialize a stretch request into a string, for use with the "RangeValues" parameter
259
261
@@ -349,7 +351,7 @@ callback function takes one parameter, an object literal, the fields vary depen
`firefly.action.dispatchCreateRegionLayer(regionId, layerTitle, fileOnServer ='', regionAry=[], plotId = [])` - overlay region data on an image plots with the given ids
354
+
`firefly.action.dispatchCreateRegionLayer(regionId, layerTitle, fileOnServer ='', regionAry=[], plotId = [], selectMode)` - overlay region data on an image plots with the given ids
353
355
354
356
| Parameter | Type | Description |
355
357
| ---------- | ---- | ----------- |
@@ -358,6 +360,7 @@ callback function takes one parameter, an object literal, the fields vary depen
358
360
| fileOnServer | string | region file on the server |
359
361
| regionAry | array | an array of strings, each describing a ds9 region |
360
362
| plotId | string or array | a plot id or an array of plot ids |
363
+
| selectMode | object | rendering features for the selected region |
361
364
362
365
Note: if no plotId is given, the region layer is created on all plots.
363
366
@@ -376,13 +379,18 @@ Note: if no plotId is given, the region layer is removed from all plots.
`firefly.action.dispatchAddRegionEntry(regionId, regionChanges)` - add region data to the given region layer
382
+
`firefly.action.dispatchAddRegionEntry(regionId, regionChanges, plotId=[], layerTitle='', selectMode = {})` - add region data to the given region layer
380
383
381
384
| Parameter | Type | Description |
382
385
| ---------- | ---- | ----------- |
383
386
| regionId | string | region layer id |
384
387
| regionChanges | array | an array of strings, each describing a ds9 region |
385
388
389
+
Other parameters are optional drawing layer creation parameters, similar to those of `firefly.action.dispatchCreateRegionLayer`.
390
+
It is possible to create region layer by adding the first region to it.
`firefly.util.image.getSelectedRegion(drawLayerId)` - get ds9 string for the selected region in the given drawing layer. The returned string will always have coordinate system (image, physical, j2000, ...) in the front.
Copy file name to clipboardExpand all lines: docs/firefly-environment.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,13 +31,13 @@ Firefly relies heavily on its configuration to provide customizable behaviors fo
31
31
You can change the default configuration both during build time and during runtime.
32
32
33
33
#### Runtime
34
-
Using Firefly Viewer with a context name of `fftools` as an example.
35
-
When deployed, the configuration files reside in CATALINA_BASE/webapps/fftools/WEB-INF/config/.
34
+
Using Firefly Viewer with a context name of `firefly` as an example.
35
+
When deployed, the configuration files reside in CATALINA_BASE/webapps/firefly/WEB-INF/config/.
36
36
Although, you can make direct changes to those files, it is not recommended.
37
37
It should only be use to temporarily test a new configuration.
38
38
If you wish to override a property in one of the `.prop` files, you can drop your own `.prop` file into
39
39
the `${server_config_dir}` directory. To setup the `${server_config_dir}` variable, add this line to the `setenv.sh` file.
40
-
In this example, if you set it to `/my_app_config`, it will look for `.prop` files in `/my_app_config/fftools/`.
40
+
In this example, if you set it to `/my_app_config`, it will look for `.prop` files in `/my_app_config/firefly/`.
41
41
42
42
JAVA_OPTS="-Dserver_config_dir=/my_app_config"
43
43
@@ -46,9 +46,13 @@ In this example, if you set it to `/my_app_config`, it will look for `.prop` fil
46
46
47
47
You can change the configuration of a build in a several ways. First, by specifying which environment this build is for.
48
48
To do that, you add the `-Penv=<type>` to your gradle command. At the moment, there are 4 types of env: local, dev, test, and ops with local being the default.
49
-
Here is an example of building Firefly Viewer for the ops envronment.
49
+
Here is an example of building Firefly Viewer for the ops environment.
50
50
51
-
$ gradle -Penv=ops :fftools:war
51
+
$ gradle -Penv=ops :firefly:war
52
+
53
+
Another example of building Firefly Viewer with the API documentation and tutorial for dev environment.
54
+
55
+
$ gradle -Penv=dev :firefly:warAll
52
56
53
57
`firefly/config/app.config` contains a list of properties used during the build. The `environments{}` block define properties specific for a particular environment.
54
58
In any cases, if a property is not found for a given env, it will use the one defined outside of the `environments{}` block.
0 commit comments