Skip to content

Commit

Permalink
fix: Height in Advanced Editor [FC-0076] (#1649)
Browse files Browse the repository at this point in the history
Updates the height of the Advanced Editor.
  • Loading branch information
ChrisChV authored Feb 13, 2025
1 parent 0b08d82 commit 59243b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/library-authoring/LibraryBlock/LibraryBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export const LibraryBlock = ({
view,
}: LibraryBlockProps) => {
const iframeRef = useRef<HTMLIFrameElement>(null);
const [iFrameHeight, setIFrameHeight] = useState(50);
const xblockView = view ?? 'student_view';
const defaultiFrameHeight = xblockView === 'studio_view' ? 80 : 50;

const [iFrameHeight, setIFrameHeight] = useState(defaultiFrameHeight);
const studioBaseUrl = getConfig().STUDIO_BASE_URL;

const intl = useIntl();
Expand Down Expand Up @@ -77,8 +80,6 @@ export const LibraryBlock = ({

const queryStr = version ? `?version=${version}` : '';

const xblockView = view ?? 'student_view';

return (
<div style={{
height: `${iFrameHeight}vh`,
Expand Down

0 comments on commit 59243b0

Please sign in to comment.