@@ -13,21 +13,21 @@ const assign = require('object-assign');
1313const { createSelector} = require ( "reselect" ) ;
1414const { Glyphicon, Panel} = require ( 'react-bootstrap' ) ;
1515const ContainerDimensions = require ( 'react-container-dimensions' ) . default ;
16- const Dock = require ( 'react-dock' ) . default ;
1716
1817const { addService, deleteService, textSearch, changeCatalogFormat, changeCatalogMode,
1918 changeUrl, changeTitle, changeAutoload, changeType, changeSelectedService,
2019 addLayer, addLayerError, resetCatalog, focusServicesList} = require ( "../actions/catalog" ) ;
2120const { zoomToExtent} = require ( "../actions/map" ) ;
2221const { currentLocaleSelector} = require ( "../selectors/locale" ) ;
23- const { setControlProperty, toggleControl } = require ( "../actions/controls" ) ;
22+ const { setControlProperty} = require ( "../actions/controls" ) ;
2423const { resultSelector, serviceListOpenSelector, newServiceSelector,
2524 newServiceTypeSelector, selectedServiceTypeSelector, searchOptionsSelector,
2625 servicesSelector, formatsSelector, loadingErrorSelector, selectedServiceSelector,
2726 modeSelector, layerErrorSelector, activeSelector, savingSelector, authkeyParamNameSelector
2827} = require ( "../selectors/catalog" ) ;
2928const { mapLayoutValuesSelector} = require ( '../selectors/maplayout' ) ;
3029const Message = require ( "../components/I18N/Message" ) ;
30+ const DockPanel = require ( "../components/misc/panels/DockPanel" ) ;
3131require ( './metadataexplorer/css/style.css' ) ;
3232
3333const CatalogUtils = require ( '../utils/CatalogUtils' ) ;
@@ -113,8 +113,7 @@ class MetadataExplorerComponent extends React.Component {
113113 width : 660 ,
114114 dockProps : {
115115 dimMode : "none" ,
116- size : 0.30 ,
117- fluid : true ,
116+ fluid : false ,
118117 position : "right" ,
119118 zIndex : 1030
120119 } ,
@@ -123,18 +122,25 @@ class MetadataExplorerComponent extends React.Component {
123122
124123 render ( ) {
125124 const panel = < Catalog zoomToLayer = { this . props . zoomToLayer } searchOnStartup = { this . props . searchOnStartup } active = { this . props . active } { ...this . props } /> ;
126- const panelHeader = ( < span > < Glyphicon glyph = "folder-open" /> < span className = "metadataexplorer-panel-title" > < Message msgId = "catalog.title" /> </ span > < span className = "shapefile-panel-close panel-close" onClick = { toggleControl . bind ( null , 'styler' , null ) } > </ span > < button onClick = { this . props . toggleControl } className = "catalog-close close" > { this . props . closeGlyph ? < Glyphicon glyph = { this . props . closeGlyph } /> : < span > ×</ span > } </ button > </ span > ) ;
127- return this . props . active ? (
128- < ContainerDimensions >
129- { ( { width } ) =>
130- < Dock dockStyle = { this . props . dockStyle } { ...this . props . dockProps } isVisible = { this . props . active } size = { this . props . width / width > 1 ? 1 : this . props . width / width } >
131- < Panel id = { this . props . id } header = { panelHeader } style = { this . props . panelStyle } className = { this . props . panelClassName } >
132- { panel }
133- </ Panel >
134- </ Dock >
135- }
136- </ ContainerDimensions >
137- ) : null ;
125+ return (
126+ < div style = { { width : '100%' , height : '100%' , pointerEvents : 'none' } } >
127+ < ContainerDimensions >
128+ { ( { width } ) => ( < DockPanel
129+ open = { this . props . active }
130+ size = { this . props . width / width > 1 ? width : this . props . width }
131+ position = "right"
132+ bsStyle = "primary"
133+ title = { < Message msgId = "catalog.title" /> }
134+ onClose = { ( ) => this . props . toggleControl ( ) }
135+ glyph = "folder-open"
136+ style = { this . props . dockStyle } >
137+ < Panel id = { this . props . id } style = { this . props . panelStyle } className = { this . props . panelClassName } >
138+ { panel }
139+ </ Panel >
140+ </ DockPanel > ) }
141+ </ ContainerDimensions >
142+ </ div >
143+ ) ;
138144 }
139145}
140146
0 commit comments