Skip to content

Commit

Permalink
Fix 3d viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed Oct 14, 2024
1 parent 9f51d4b commit 8ed3145
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
18 changes: 10 additions & 8 deletions qgis-app/templates/base/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,17 @@ <h3 class="title is-4">{{ object_detail.name }}</h3>
</div>
</div>
<hr />
<div class="style-polaroid">
{% if object_detail.thumbnail_image and object_detail.thumbnail_image.file %}
{% thumbnail object_detail.thumbnail_image "420x420" format="PNG" as im %}
<img class="image-resource" alt="{% trans "image" %}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
{% endthumbnail %}
{% endif %}
{% if is_3d_model %}
{% include "base/includes/wavefront/detail_3dviewer.html" %}
<div class="view-resource mb-3">
<div class="style-polaroid">
{% if object_detail.thumbnail_image and object_detail.thumbnail_image.file %}
{% thumbnail object_detail.thumbnail_image "420x420" format="PNG" as im %}
<img class="image-resource" alt="{% trans "image" %}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
{% endthumbnail %}
{% endif %}
{% if is_3d_model %}
{% include "base/includes/wavefront/detail_3dviewer.html" %}
{% endif %}
</div>
</div>
{% include "base/includes/detail_object.html" %}
<hr />
Expand Down
7 changes: 3 additions & 4 deletions qgis-app/wavefronts/static/wavefront/css/wavefront.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
opacity: 0;
position: absolute;
top: 30%;
left: 40%;
left: 43%;
}

.style-polaroid:hover .image-resource {
Expand All @@ -28,16 +28,15 @@
/* 3d style */
.container-3dview {
width: 100%;
margin-left: 1em;
margin-top: 23px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
cursor: move;
display: flex;
align-items: center;
justify-content: center;
}
#c {
width: 100%;
border-radius: 10px;
border: 1px solid #ccc;
}

/* Loading icon */
Expand Down

0 comments on commit 8ed3145

Please sign in to comment.