Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions webview/src/plots/components/PlotsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
const maxNbPlotsPerRow = useSelector(
(state: PlotsState) => state.webview.maxNbPlotsPerRow
)
const ribbonHeight = useSelector((state: PlotsState) => state.ribbon.height)

useEffect(() => {
window.dispatchEvent(new Event('resize'))
Expand Down Expand Up @@ -116,6 +117,7 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
{changeNbItemsPerRow && hasItems && maxNbPlotsPerRow > 1 && (
<div
className={styles.nbItemsPerRowSlider}
style={{ top: ribbonHeight - 4 }}
data-testid="nb-items-per-row-slider"
>
<MinMaxSlider
Expand All @@ -125,6 +127,7 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
onChange={handleResize}
defaultValue={-nbItemsPerRow}
/>
main
</div>
)}
{open && (
Expand Down
8 changes: 7 additions & 1 deletion webview/src/plots/components/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,15 @@ $gap: 20px;
}

.nbItemsPerRowSlider {
position: sticky;
right: 0;
top: 0;
width: 100%;
display: flex;
justify-content: end;
margin: 20px;
padding: 20px;
background-color: $bg-color;
z-index: 3;
}

:global(.has-actions) {
Expand Down