Skip to content

Commit a5c9781

Browse files
author
Ives van Hoorne
committed
Allow for forced split screen in embeds
1 parent 47bd585 commit a5c9781

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common/url.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ export const getSandboxOptions = (url: string) => {
2626

2727
result.isPreviewScreen = url.includes('view=preview');
2828
result.isEditorScreen = url.includes('view=editor');
29+
result.isSplitScreen = url.includes('view=split');
2930

3031
// If there is no view specified and the width of the window is <800 we want
3132
// to default to preview
32-
if (!result.isPreviewScreen && !result.isEditorScreen) {
33+
if (
34+
!result.isPreviewScreen &&
35+
!result.isEditorScreen &&
36+
!result.isSplitScreen
37+
) {
3338
const windowWidth =
3439
window.innerWidth || document.documentElement.clientWidth;
3540
result.isPreviewScreen = windowWidth < 800;

0 commit comments

Comments
 (0)