Skip to content

Commit d318cfd

Browse files
author
Benedikt Artelt
committed
Merge branch 'swp_autoping_implement_modular_layout' into codeocean-tuil-dynlay
2 parents c81ef24 + a1a7f1a commit d318cfd

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

app/assets/javascripts/editor/editor.js.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,13 @@ var CodeOceanEditor = {
237237
},
238238

239239
resizeSidebars: function () {
240-
$('#content-left-sidebar').height(this.calculateEditorHeight('#content-left-sidebar', false));
240+
let editorHeightLeftSidebar = this.calculateEditorHeight('#content-left-sidebar', false);
241+
$('#content-left-sidebar').height(function() {
242+
if($('#resizerHorizontal').css('display') === 'none')
243+
return 'auto';
244+
else
245+
return editorHeightLeftSidebar;
246+
});
241247
$('#content-right-sidebar').height(this.calculateEditorHeight('#content-right-sidebar', false));
242248
},
243249

app/assets/stylesheets/editor.css.scss

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,16 @@
2525

2626
#panel-left {
2727
position: relative;
28-
max-height: 85vh;
29-
overflow-y: scroll;
28+
}
29+
30+
// Bootstrap breakpoint "large". See https://getbootstrap.com/docs/4.0/layout/overview/#responsive-breakpoints
31+
@media (min-width: 992px) {
32+
33+
#panel-left {
34+
position: relative;
35+
max-height: 85vh;
36+
overflow-y: scroll;
37+
}
3038
}
3139

3240
#panel-right {
@@ -83,7 +91,7 @@ html[data-bs-theme="light"] {
8391
}
8492

8593
#content-left-sidebar, #content-right-sidebar {
86-
min-height: 250px;
94+
max-height: 500px;
8795
}
8896

8997
.frame {

0 commit comments

Comments
 (0)