Skip to content

Commit

Permalink
Make hide/show controls button sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
chowington committed Oct 9, 2023
1 parent b7dfc60 commit d62723b
Showing 1 changed file with 36 additions and 29 deletions.
65 changes: 36 additions & 29 deletions packages/libs/eda/src/lib/map/analysis/DraggableVisualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,14 @@ export default function DraggableVisualization({
>
<div
style={{
// Initial height & width.
height: 547,
width: 779,
// This prevents the panel from collapsing aburdly.
minWidth: 400,
minHeight: 200,
position: 'relative',
width: '100%',
height: '100%',
}}
>
<div
style={{
position: 'absolute',
top: 0,
right: 0,
zIndex: 100,
padding: '0.5rem',
Expand All @@ -108,28 +104,39 @@ export default function DraggableVisualization({
onPress={() => setHideInputsAndControls(!hideInputsAndControls)}
/>
</div>
<FullScreenVisualization
// options={{}}
analysisState={analysisState}
computation={activeComputation!}
visualizationPlugins={visualizationPlugins}
visualizationsOverview={app.visualizations}
geoConfigs={geoConfigs}
computationAppOverview={app}
filters={filters}
starredVariables={
analysisState.analysis?.descriptor.starredVariables ?? []
}
toggleStarredVariable={toggleStarredVariable}
totalCounts={totalCounts}
filteredCounts={filteredCounts}
isSingleAppMode
disableThumbnailCreation
id={activeViz.visualizationId}
actions={<></>}
plugins={plugins}
hideInputsAndControls={hideInputsAndControls}
/>
<div
style={{
// Initial height & width.
height: 547,
width: 779,
// This prevents the panel from collapsing aburdly.
minWidth: 400,
minHeight: 200,
overflow: 'auto',
}}
>
<FullScreenVisualization
analysisState={analysisState}
computation={activeComputation!}
visualizationPlugins={visualizationPlugins}
visualizationsOverview={app.visualizations}
geoConfigs={geoConfigs}
computationAppOverview={app}
filters={filters}
starredVariables={
analysisState.analysis?.descriptor.starredVariables ?? []
}
toggleStarredVariable={toggleStarredVariable}
totalCounts={totalCounts}
filteredCounts={filteredCounts}
isSingleAppMode
disableThumbnailCreation
id={activeViz.visualizationId}
actions={<></>}
plugins={plugins}
hideInputsAndControls={hideInputsAndControls}
/>
</div>
</div>
</DraggablePanel>
) : null;
Expand Down

0 comments on commit d62723b

Please sign in to comment.