Skip to content

Commit

Permalink
lint changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GnsP committed Nov 25, 2024
1 parent d811c4f commit ccda48a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/cdap/components/layouts/SectionWithPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default function SectionWithPanel({
}

async function resizePanelTo(
opensFrom: PanelOpeningDirection,
panelOpensFrom: PanelOpeningDirection,
newSize: number,
durationInMs: number = 0
): Promise<void> {
Expand All @@ -331,15 +331,15 @@ export default function SectionWithPanel({
const oldPanelWrapperTransition = panelWrapperRef.current.style.transition;
const oldDividerTransition = dividerRef.current.style.transition;

const transitioningDimension = isHorizontal(opensFrom) ? 'width' : 'height';
const transitioningDimension = isHorizontal(panelOpensFrom) ? 'width' : 'height';

if (durationInMs) {
panelWrapperRef.current.style.transition = `${transitioningDimension} ${durationInMs /
1000}s linear`;
dividerRef.current.style.transition = `${opensFrom} ${durationInMs / 1000}s linear`;
dividerRef.current.style.transition = `${panelOpensFrom} ${durationInMs / 1000}s linear`;
}
panelWrapperRef.current.style[transitioningDimension] = `${newSize}px`;
dividerRef.current.style[opensFrom] = `${newSize - DIVIDER_SIZE}px`;
dividerRef.current.style[panelOpensFrom] = `${newSize - DIVIDER_SIZE}px`;

if (durationInMs) {
await sleep(durationInMs);
Expand Down

0 comments on commit ccda48a

Please sign in to comment.