@@ -15,34 +15,28 @@ const dispatchShowDropDown= ({view, initArgs}) =>
1515 flux . process ( { type : 'layout.showDropDown' , payload : { visible : true , view, initArgs} } ) ;
1616//------------
1717
18- const showTap = ( initArgs ) => {
18+ export const showTapSearchPanel = ( searchParams = { } ) => {
1919 const view = getAppOptions ( ) ?. multiTableSearchCmdOptions ?. find ( ( { id} ) => id === 'tap' ) ? 'MultiTableSearchCmd' : 'TAPSearch' ;
20- dispatchShowDropDown ( { view, initArgs} ) ;
20+ dispatchShowDropDown ( { view, initArgs : { defaultSelectedId : 'tap' , searchParams } } ) ;
2121} ;
2222
2323const showImage = ( initArgs ) => dispatchShowDropDown ( { view : 'ImageSelectDropDownCmd' , initArgs} ) ;
2424
2525export const makeDefTapSearchActions = ( ) => {
2626 return [
2727 makeSearchAction ( 'tapRadius' , 'tap' , 'TAP ' , 'Cone Search' , SearchTypes . pointRadius , .001 , 2.25 ,
28- ( sa , cenWpt , radius ) => {
29- showTap ( { defaultSelectedId : 'tap' , searchParams : { radiusInArcSec : radius , wp : cenWpt } } ) ;
30- } ) ,
28+ ( sa , cenWpt , radius ) => showTapSearchPanel ( { radiusInArcSec : radius , wp : cenWpt } ) , ) ,
3129 makeSearchAction ( 'tapArea' , 'tap' , 'TAP' , 'Area Search' , SearchTypes . area , undefined , undefined ,
32- ( sa , cenWpt , radius , corners ) => {
33- showTap ( { defaultSelectedId : 'tap' , searchParams : { corners} } ) ;
34- } ) ,
35- makeSearchAction ( 'tapRadius' , 'tap' , 'TAP ' , 'Cone Search' , SearchTypes . point_table_only , .001 , 2.25 ,
36- ( sa , cenWpt ) => {
37- showTap ( { defaultSelectedId : 'tap' , searchParams : { wp : cenWpt } } ) ;
38- } ) ,
30+ ( sa , cenWpt , radius , corners ) => showTapSearchPanel ( { corners} ) , ) ,
31+ makeSearchAction ( 'tableTapRadius' , 'tap' , 'TAP ' , 'Cone Search' , SearchTypes . point_table_only , .001 , 2.25 ,
32+ ( sa , cenWpt ) => showTapSearchPanel ( { wp : cenWpt } ) , ) ,
3933 ] ;
4034} ;
4135
4236
4337export const makeDefImageSearchActions = ( ) => {
4438 return [
45- makeSearchAction ( 'imageFits' , 'image' , 'FITS' , 'Fits tip ' , SearchTypes . point , undefined , undefined ,
39+ makeSearchAction ( 'imageFits' , 'image' , 'FITS' , 'Load a FITS Image at this point ' , SearchTypes . point , undefined , undefined ,
4640 ( sa , wp ) => showImage ( { searchParams : { wp, type : 'singleChannel' } } ) ) ,
4741 makeSearchAction ( 'HiPS' , 'image' , 'HiPS' , 'HiPS tip' , SearchTypes . pointRadius , .0025 , 180 ,
4842 ( sa , wp , radius ) => showImage ( { searchParams : { wp, type : 'hipsImage' , radius} } ) , 'Display HiPS at region center' ) ,
0 commit comments