@@ -32,7 +32,7 @@ import { UPDATE_MAP_LAYOUT, updateMapLayout } from '../../../actions/maplayout';
3232import { changeMousePointer , CLICK_ON_MAP , zoomToExtent } from '../../../actions/map' ;
3333import { CONTROL_NAME , DEFAULT_SEARCH_CONFIG , ITINERARY_ROUTE_LAYER } from '../constants' ;
3434import { enabledSelector , itinerarySearchConfigSelector , locationsSelector } from '../selectors/itinerary' ;
35- import { DEFAULT_PANEL_WIDTH } from '../../../utils/LayoutUtils' ;
35+ import { DEFAULT_PANEL_WIDTH , getBoundingSidebarRect } from '../../../utils/LayoutUtils' ;
3636import { changeMapInfoState , purgeMapInfoResults } from '../../../actions/mapInfo' ;
3737import { removeAdditionalLayer , removeAllAdditionalLayers , updateAdditionalLayer } from '../../../actions/additionallayers' ;
3838import { SET_CONTROL_PROPERTY , setControlProperty , TOGGLE_CONTROL } from '../../../actions/controls' ;
@@ -54,13 +54,15 @@ export const itineraryMapLayoutEpic = (action$, store) =>
5454 action$ . ofType ( UPDATE_MAP_LAYOUT )
5555 . filter ( ( { source} ) => enabledSelector ( store . getState ( ) ) && isNil ( source ) )
5656 . map ( ( { layout} ) => {
57+ const boundingSidebarRect = getBoundingSidebarRect ( layout ) ;
5758 const action = updateMapLayout ( {
5859 ...layout ,
59- right : OFFSET + ( layout ?. boundingSidebarRect ? .right ?? 0 ) ,
60+ right : OFFSET + boundingSidebarRect . right ,
6061 boundingMapRect : {
6162 ...( layout . boundingMapRect || { } ) ,
62- right : OFFSET + ( layout ?. boundingSidebarRect ? .right ?? 0 )
63+ right : OFFSET + boundingSidebarRect . right
6364 } ,
65+ boundingSidebarRect,
6466 rightPanel : true
6567 } ) ;
6668 return { ...action , source : CONTROL_NAME } ;
0 commit comments