Skip to content

Commit

Permalink
Added spinner to pre-load phase
Browse files Browse the repository at this point in the history
  • Loading branch information
LuomaJuha committed Sep 11, 2024
1 parent 2aef9ac commit 0b3c49e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/finna2/js/finna-model-viewer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global THREE, ObjectEditor */
/* global THREE, ObjectEditor, VuFind */

/**
* Get tangent
Expand Down Expand Up @@ -425,7 +425,7 @@ class ModelViewerClass extends HTMLElement {
/**
* Start to load the model from the provider to cache
*/
this.loadInfo.textContent = this.translations['loading file'] || 'Model loading.';
this.loadInfo.innerHTML = `<span>${this.translations['loading file'] || 'Model loading.'} ${VuFind.spinner()}</span>`;
fetch(this.src)
.then(response => response.json())
.then(responseJSON => {
Expand Down
3 changes: 3 additions & 0 deletions themes/finna2/less/finna/record.less
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,9 @@ finna-model-viewer {
font-weight: 500;
line-height: 1.5;
border-radius: 4px;
span.fa-spinner::before {
color: white;
}
}
&.fullscreen {
position: absolute;
Expand Down

0 comments on commit 0b3c49e

Please sign in to comment.