Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Specify classes and avoid unnecessary vertical scrollbars

Henriette Dinger3d4ab62af6d9
diff --git a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
index d003f59d6c3..61919f33ecb 100644
--- a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
+++ b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
@@ -10,8 +10,8 @@
// The IFC viewer shall fill the viewport to the bottom.
// This is different to how we style #content else where.
.controller-ifc_models\/ifc_models
- overflow-x: hidden
-
+ overflow: hidden
+
&.action-show,
&.action-show_defaults
#content
@@ -19,22 +19,23 @@
flex-direction: column
height: 100%
+ // Override default behavior to let the viewer span the whole height
+ @media only screen and (max-width: 679px)
+ #content-wrapper
+ height: calc(100vh - 55px)
+
[data-name="ifc_models"] .main-menu--children
overflow-x: hidden !important
-.ifc-model-viewer--container
+.ifc-viewer--container
flex-grow: 1
position: relative
width: 100%
height: 100%
+ overflow: hidden
border-top: 1px solid $gray-dark
border-bottom: 1px solid $gray-dark
- .ifc-model-viewer--model-canvas
- width: 100%
- height: 100%
- background: $gray-lighter
-
.ifc-model-viewer--nav-cube-canvas
position: absolute
width: 200px
@@ -51,6 +52,16 @@
right: 50px
z-index: 2000
+.ifc-model-viewer--container
+ position: relative
+ width: 100%
+ height: 100%
+
+ .ifc-model-viewer--model-canvas
+ width: 100%
+ height: 100%
+ background: $gray-lighter
+
// -------------------------- XEOKIT specific rules for BUTTONS --------------------------
.xeokit-btn-group
diff --git a/modules/ifc_models/app/views/ifc_models/ifc_models/show.html.erb b/modules/ifc_models/app/views/ifc_models/ifc_models/show.html.erb
index 28c6103cc38..1496adb0c3c 100644
--- a/modules/ifc_models/app/views/ifc_models/ifc_models/show.html.erb
+++ b/modules/ifc_models/app/views/ifc_models/ifc_models/show.html.erb
@@ -56,7 +56,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<% if @ifc_model.converted? %>
-<div class="ifc-model-viewer--container">
+<div class="ifc-viewer--container">
<ifc-viewer></ifc-viewer>
</div>
<% end %>
diff --git a/modules/ifc_models/app/views/ifc_models/ifc_models/show_defaults.html.erb b/modules/ifc_models/app/views/ifc_models/ifc_models/show_defaults.html.erb
index 5b5702c9c1c..7eb221a5069 100644
--- a/modules/ifc_models/app/views/ifc_models/ifc_models/show_defaults.html.erb
+++ b/modules/ifc_models/app/views/ifc_models/ifc_models/show_defaults.html.erb
@@ -61,7 +61,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% end %>
<% if @default_ifc_models.map(&:converted?).uniq == [true] %>
-<div class="ifc-model-viewer--container">
+<div class="ifc-viewer--container">
<ifc-viewer></ifc-viewer>
</div>
<% end %>