hides model until preload image has loaded

This commit is contained in:
buttle 2021-06-20 17:02:13 +02:00
parent 4c3dfe5d49
commit 8e61892290
3 changed files with 18 additions and 11 deletions

View File

@ -2,7 +2,8 @@
.model-wrap { .model-wrap {
padding: 1em; padding: 1em;
background-color: lightgray; display: none;
/*background-color: lightgray;*/
} }
#object { #object {

2
static/jquery-3.6.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,7 @@
% rebase('base.tpl') % rebase('base.tpl')
<script src="/static/jquery-3.6.0.min.js"></script>
<style> <style>
model-viewer { model-viewer {
width: 500px; width: 500px;
@ -44,9 +46,6 @@ model-viewer {
</style> </style>
%end %end
<h3> <h3>
<i class="fa fa-folder-o" aria-hidden="true"></i> <i class="fa fa-folder-o" aria-hidden="true"></i>
<a href="/list/{{ current_dir.rstrip('/') }}">objects/{{current_dir}}</a> <a href="/list/{{ current_dir.rstrip('/') }}">objects/{{current_dir}}</a>
@ -79,5 +78,10 @@ model-viewer {
</div> </div>
</div> </div>
<script type="module" src="/static/vendor/google/model-viewer.js"></script> <script type="module" src="/static/vendor/google/model-viewer.js"></script>
<script>
jQuery(function($) {
$(".model-wrap").show();
});
</script>