Actions and action dispatchers.
- Source:
Methods
-
<static> dispatchAddRegionEntry(drawLayerId, regionChanges, plotId, layerTitle, selectMode, dispatcher)
Add regions to drawing layer
-
Parameters:
Name Type Description drawLayerIdstring id of the drawing layer where the region(s) are added to if the layer doesn't exist, a new drawing layer is created by either using the specified drawLayerId or creating a new id based on the setting of 'layerTitle' in case drawLayerId is undefined
regionChangesArray.<string> | string array or string of region description
plotIdArray.<string> | string array or string of plot id. If plotId is empty, all plots of the active group are applied
layerTitlestring will replace the original title if the drawing layer exists and layerTitle is non-empty
selectModeRegionSelectMode rendering features for the selected region
dispatcherfunction - Source:
-
<static> dispatchAddTableTypeWatcherDef(p)
Add a table type watcher definition. Test every table (existing or new) and if the test is passed then create a table type watcher for that table.
-
A table type watcher, by using the payload definition will start a single watch for ever table that is newly loaded or previously loaded that passes the 'testTable' function test. These watchers will have the same life time of the table they are watching. A TableType watcher is like a normal watcher with following exceptions:
- tbl_id is first parameter.
- The params object with always include a options and a sharedData property. They may be undefined.
- The options object should be thought of as read only. It should not be modified.
- It is call the first time with the action undefined. This can be for initialization. The table will beloaded
Parameters:
Name Type Description pobject Properties
Name Type Argument Description idString a unique identifier for this watcher
testTableTestWatchFunc function: testTable(table,action,options), return true, if we should watch this table type
watcherTableWatchFunc function watcher(tbl_id,action,cancelSelf,params), note- TableWatchFunc is called when the first time for initialization for the first call action is null
sharedDataObject <optional>
optionsObject <optional>
actionsArray.<String> array of string action id's
excludes-Array.<String> excluded id list. if testTable return true then this list will force any watcher def with an id in the list to not watch
stopPropagationboolean like excludes but if true not only watcher will be added
enabledboolean if true this TableTypeWatcher will test and add, if false it will be skipped
allowMultiplesboolean multiple defs of this type are allowed.
- Source:
- See:
-
<static> dispatchApiToolsView(apiToolsView, useFloatToolbar)
Tweek how the API image view works
. -
Tweek how the API image view works
Parameters:
Name Type Description apiToolsViewboolean useFloatToolbarboolean - Source:
-
<static> dispatchAttachLayerToPlot(id, plotId, attachAllPlot, visible, plotTypeMustMatch)
attach drawing layer to plot
-
Parameters:
Name Type Description idstring | Array.<string> make the drawLayerId or drawLayerTypeId, this may be an array
plotIdstring | Array.<string> to attach this may by a string or an array of strings
attachAllPlotboolean visibleboolean | string Can have three values: true: layer is attach visible, false: attach not-visible, value (string) 'inherit' layer is visible
plotTypeMustMatchboolean - Source:
-
<static> dispatchChangeDrawingDef(id, drawingDef, plotId [, matchTitle])
change the drawing definition of the drawing layer
-
Parameters:
Name Type Argument Description idstring | Array.<string> make the drawLayerId or drawLayerTypeId, this may be an array
drawingDefplotIdmatchTitleboolean <optional>
matches any draw layers that have the same title as the one specified by the id
- Source:
-
<static> dispatchChangeVisibility(p)
change the visibility of one more drawing layers on a set of WebPlots. This function can match the drawing layers using drawLayerId, drawLayerTypeId and further match using the title of the draw layer. it can match hhe plots by plotId, then all the plots in the group, and then can limit the plots in the group using subgroupId
-
Parameters:
Name Type Description pObject Properties
Name Type Argument Description idstring | Array.<string> make the drawLayerId or drawLayerTypeId, this may be an array
visibleboolean plotIdstring the plotId to change the visibility on, if used group is defined then visibility will be change for all the plotIds in the PlotGroup
useGroupboolean <optional>
If true, get all the plotViews in the group of the plotId, if false use only the one
subGroupIdstring <optional>
if defined the list of PlotViews affected will be filtered by the subGroupId. In other words it will only change the visibility on PlotView that have a matching subGroupId.
matchTitleboolean <optional>
matches any draw layers that have the same title as the one specified by the id
- Source:
-
<static> dispatchChartUpdate(p)
Update chart data.
-
Update chart data. The parameter should have a partial object it wants to update. The keys of the partial object should be in path-string format, ie. 'a.b.c'.
Parameters:
Name Type Description pObject dispatch parameetrs
Properties
Name Type Argument Default Description chartIdstring chart id
changesObject object with the path-string keys and values of the changed props
dispatcherfunction <optional>
flux.process only for special dispatching uses such as remote
- Source:
-
<static> dispatchColorChange(obj)
Show image with new color table loaded Note - function parameter is a single object
. -
Show image with new color table loaded Note - function parameter is a single object
Parameters:
Name Type Description objObject Properties
Name Type Argument Description plotIdstring cbarIdnumber must be in the range, 0 - 21, each number represents different colorbar
actionScopestring | ActionScope <optional>
default to group
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchCreateDrawLayer(drawLayerTypeId, params)
create drawing layer
-
Parameters:
Name Type Description drawLayerTypeIdstring id of drawing layer
paramsObject - Source:
-
<static> dispatchCreateFootprintLayer(footprintId, layerTitle, footprintData, plotId, attachPlotGroup, dispatcher)
create drawing layer with footprint
-
Parameters:
Name Type Description footprintIdstring id of the drawing layer
layerTitlestring title of the drawing layer
footprintDatafootprintInfo footprint information for footprint layer, relocateBy: 'origin' means relocating footprint origin to the target location 'center' means relocating footprint center to the target location
plotIdArray.<string> | string array or string of plot id. If plotId is empty, all plots of the active group are applied
attachPlotGroupbool attach all plots of the same plot group
dispatcher- Source:
-
<static> dispatchCreateMarkerLayer(markerId, layerTitle, plotId, attachPlotGroup, dispatcher)
create drawing layer with marker
-
Parameters:
Name Type Description markerIdstring id of the drawing layer
layerTitlestring title of the drawing layer
plotIdArray.<string> | string array or string of plot id. If plotId is empty, all plots of the active group are applied
attachPlotGroupbool attach all plots of the same plot group
dispatcher- Source:
-
<static> dispatchCreateRegionLayer(drawLayerId, layerTitle, fileOnServer, regionAry, plotId, selectMode, dispatcher)
Create drawing layer based on region file or region description
-
Parameters:
Name Type Description drawLayerIdstring id of the drawing layer to be created, required
layerTitlestring if it is empty, it will be created internally
fileOnServerstring region file name on server
regionAryArray.<string> | string array or string of region description
plotIdArray.<string> | string array or string of plot id. If plotId is empty, all plots of the active group are applied
selectModeRegionSelectMode rendering features for the selected region
dispatcherfunction - Source:
-
<static> dispatchCrop(p)
Crop Note - function parameter is a single object
-
Parameters:
Name Type Description pObject Properties
Name Type Argument Description plotIdstring imagePt1Object image point of corner 1
imagePt2Object image point of corner 2
cropMultiAllboolean dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchDeletePlotView(p)
Delete a PlotView Note - function parameter is a single object
-
Parameters:
Name Type Description pObject this function takes a single parameter
Properties
Name Type Argument Default Description plotIdstring holdWcsMatchboolean <optional>
true if wcs match is on, then modify the request to hold the wcs match
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchDeleteRegionLayer(drawLayerId, plotId, dispatcher)
Delete the region drawing layer
-
Parameters:
Name Type Description drawLayerIdstring id of the drawing layer to be deleted, required
plotIdArray.<string> | string array or string of plot id. If plotId is empty, all plots of the active group are applied
dispatcherfunction - Source:
-
<static> dispatchDestroyDrawLayer(id)
destroy the drawing layer
-
Parameters:
Name Type Description idstring make the drawLayerId or drawLayerTypeId
- Source:
-
<static> dispatchDetachLayerFromPlot(id, plotId, detachAllPlot, destroyWhenAllDetached)
Detach drawing layer from the plot
-
Parameters:
Name Type Description idstring | Array.<string> make the drawLayerId or drawLayerTypeId, this may be an array
plotIdstring | Array.<string> to attach this may by a string or an array of string
detachAllPlotdestroyWhenAllDetachedif all plots are detached then destroy this plot
- Source:
-
<static> dispatchFlip(p)
Flip Note - function parameter is a single object
-
Parameters:
Name Type Description pObject Properties
Name Type Argument Description plotIdstring isYboolean actionScopestring | ActionScope enum ActionScope
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchForceDrawLayerUpdate(id, plotId)
force to update the drawing layer
-
Parameters:
Name Type Description idplotId- Source:
-
<static> dispatchModifyCustomField(id, changes [, plotId])
create custom changes to the drawing layer
-
Parameters:
Name Type Argument Description idstring | Array.<string> make the drawLayerId or drawLayerTypeId, this may be an array
changesObject any object of changes
plotIdstring <optional>
a plotId
- Source:
-
<static> dispatchPlotHiPS(p)
Plot a HiPS display
-
Note - function parameter is a single object
Parameters:
Name Type Description pObject this function takes a single parameter
Properties
Name Type Argument Default Description plotIdstring wpRequestWebPlotParams | WebPlotRequest hipsImageConversionHipsImageConversionSettings <optional>
if defined, use these parameter to
viewerIdstring pvOptionsPVCreateOptions PlotView init Options
attributesObject <optional>
meta data that is added the plot
setNewPlotAsActiveboolean <optional>
the last completed plot will be active
enableRestoreboolean <optional>
true if true the original request is saved for restore
renderTreeIdstring <optional>
used only with multiple rendered tree, like slate in jupyter lab
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchPlotImage(p)
Plot an image.
-
Note - function parameter is a single object
Parameters:
Name Type Description pObject Properties
Name Type Argument Default Description plotIdstring <optional>
is required unless defined in the WebPlotRequest
wpRequestWebPlotParams | WebPlotRequest | Array plotting parameters, required or for 3 color pass an array of WebPlotParams or WebPlotRequest
threeColorboolean <optional>
is a three color request, if true the wpRequest should be an array
useContextModificationsboolean <optional>
true it true the request will be modified to use preferences, rotation, etc should only be false when it is doing a 'restore to defaults' type plot
attributesObject <optional>
meta data that is added the plot
hipsImageConversionHipsImageConversionSettings <optional>
if defined, use these parameter to convert between image and HiPS
pvOptionsObject <optional>
parameter specific to the plotView, only read the first time per plot id
setNewPlotAsActiveboolean <optional>
true the new plot will be active
holdWcsMatchboolean <optional>
false if wcs match is on, then modify the request to hold the wcs match
enableRestoreboolean <optional>
true if true the original request is saved for restore
viewerIdstring <optional>
viewer that this plot should be put into, only optional if you have added the plot id manually to a viewer. otherwise, you need to specify the viewer.
renderTreeIdstring <optional>
used only with multiple rendered tree, like slate in jupyter lab
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchPlotImageOrHiPS(p)
Plot a HiPS or a image depending on the FOV size
-
Note - function parameter is a single object
Parameters:
Name Type Description pObject this function takes a single parameter
Properties
Name Type Argument Default Description plotIdstring hipsRequestWebPlotParams | WebPlotRequest imageRequestWebPlotParams | WebPlotRequest must be a ServiceType request.
allSkyRequestWebPlotParams | WebPlotRequest must be a allsky type request
plotAllSkyFirstboolean <optional>
false if there is an all sky set up then plot that first
fovDegFallOvernumber <optional>
the size in degrees that the image will switch between hips and a image cutout
fovMaxFitsSizenumber <optional>
the max size the fits image service can support
autoConvertOnZoomboolean <optional>
convert between images and FITS on zoom
viewerIdstring <optional>
renderTreeIdstring <optional>
used only with multiple rendered tree, like slate in jupyter lab
pvOptionsPVCreateOptions <optional>
PlotView init Options
attributesObject <optional>
meta data that is added the plot
setNewPlotAsActiveboolean <optional>
the last completed plot will be active
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchPlotMask(p)
Add a mask
-
Parameters:
Name Type Description pObject this function takes a single parameter
Properties
Name Type Argument Description plotIdstring maskValuenumber power of 2, e.g 4, 8, 32, 128, etc
maskNumbernumber 2, e.g 4, 8, 32, 128, etc
imageOverlayIdstring imageNumbernumber hdu number of fits
fileKeystring file on the server
colorstring color is optional, if not specified, one is chosen
titlestring relatedDataIdstring <optional>
pass a related data id if one exist
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchRecenter(p)
recenter the images on the plot center or the ACTIVE_TARGET
Note - function parameter is a single object
-
Parameters:
Name Type Description pObject Properties
Name Type Argument Description plotIdstring centerPtPoint <optional>
Point to center on
centerOnImageboolean only used if centerPt is not defined. If true then the centering will be the center of the image. If false, then the center point will be the FIXED_TARGET attribute, if defined. Otherwise it will be the center of the image.
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
-
<static> dispatchRemoveRegionEntry(drawLayerId, regionChanges, dispatcher)
remove region(s) from the drawing layer
-
Parameters:
Name Type Description drawLayerIdstring id of the drawing layer where the region(s) are removed from, required
regionChangesArray.<string> | string array or string of region description
dispatcherfunction - Source:
-
<static> dispatchRotate(p)
Rotate image, do it client side
Note - function parameter is a single object
. -
Rotate image, do it client side
Note - function parameter is a single object
Parameters:
Name Type Description pObject Properties
Name Type Description plotIdstring rotateTypeEnum enum RotateType
anglenumber actionScopestring | ActionScope enum ActionScope
dispatcherfunction only for special dispatching uses such as remote
- Source:
-
<static> dispatchSelectRegion(drawLayerId, selectedRegion, dispatcher)
select region from a drawing layer containing regions
-
Parameters:
Name Type Description drawLayerIdstring id of drawing layer where the region is selected from, required
selectedRegionArray.<string> | string | Object array or string of region description or region object (drawObj) currently only single region is allowed to be selected if the array contains the description of multiple regions. If 'null' or empty array is passed, the function works as de-select the region.
dispatcherfunction - Source:
- See:
-
- firefly.util.image.getSelectedRegion to get the string describing the selected region
-
<static> dispatchStretchChange(obj)
Change the image stretch Note - function parameter is a single object
. -
Change the image stretch Note - function parameter is a single object
Parameters:
Name Type Description objObject object literal with dispatcher parameters
Properties
Name Type Argument Description plotIdstring stretchDataArray.<Object.<band:Band, rv:RangeValues, bandVisible:boolean>> actionScopeActionScope <optional>
default to group
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
Examples
// Example of stretch 2 - 98 percent, log stretch var rv= RangeValues.makeSimple(‘percent’, 2, 98, ‘log’); const stretchData= [{ band : 'NO_BAND', rv : rv, bandVisible: true }]; action.dispatchStretchChange({plotId:’myplot’, strechData:stretchData });// Example of stretch -2 - 5 sigma, linear stretch var rv= RangeValues.makeSimple(’sigma’, -2, 5, 'linear’); const stretchData= [{ band : 'NO_BAND', rv : rv, bandVisible: true }]; action.dispatchStretchChange({plotId:’myplot’, strechData:stretchData }); -
<static> dispatchZoom(p)
Zoom a image Note - function parameter is a single object
-
Parameters:
Name Type Description pObject this function takes a single parameter
Properties
Name Type Argument Description plotIdstring userZoomTypestring | UserZoomTypes (one of ['UP','DOWN', 'FIT', 'FILL', 'ONE', 'LEVEL', 'WCS_MATCH_PREV')
maxCheckboolean <optional>
zoomLockingEnabledboolean <optional>
forceDelayboolean <optional>
levelnumber <optional>
the level to zoom to, used only userZoomType 'LEVEL'
actionScopestring | ActionScope <optional>
default to group
dispatcherfunction <optional>
only for special dispatching uses such as remote
- Source:
Examples
// Example of zoom to level action.dispatchZoom({plotId:’myplot’, userZoomType:’LEVEL’, level: .75 });// Example of zoom up action.dispatchZoom({plotId:’myplot’, userZoomType:’UP’ }};// Example of zoom to fit action.dispatchZoom({plotId:’myplot’, userZoomType:’FIT’ }};// Example of zoom to level, if you are connected to a widget that is changing the level fast, zlevel is the varible with the zoom level action.dispatchZoom({plotId:’myplot’, userZoomType:’LEVEL’, level: zlevel, forceDelay: true }}; -
<static> visRoot()
-
- Source:
Returns:
- Type
- VisRoot