diff --git a/source/website/dialog.js b/source/website/dialog.js index 3b85ac4..64e411d 100644 --- a/source/website/dialog.js +++ b/source/website/dialog.js @@ -1,5 +1,4 @@ import { AddDiv, CreateDiv } from '../engine/viewer/domutils.js'; -import { FeatureSet } from './featureset.js'; import { AddSvgIconElement, CreateInlineColorCircle, IsHoverEnabled } from './utils.js'; let currentDialog = null; @@ -136,45 +135,22 @@ export class ProgressDialog extends Dialog super (); this.SetCloseable (false); this.textDiv = null; - this.progressDiv = null; } Init (text) { let contentDiv = this.GetContentDiv (); contentDiv.classList.add ('ov_progress'); - let innerContentDiv = AddDiv (contentDiv, 'ov_progress_inner'); - let imgDiv = AddDiv (innerContentDiv, 'ov_progress_img', ''); - if (!FeatureSet.DownloadProgress) { - imgDiv.classList.add ('animated'); - } - this.textDiv = AddDiv (innerContentDiv, 'ov_progress_text'); + AddDiv (contentDiv, 'ov_progress_img', ''); + this.textDiv = AddDiv (contentDiv, 'ov_progress_text'); this.SetText (text); - - this.progressDiv = AddDiv (contentDiv, 'ov_progress_bar'); } SetText (text) { this.textDiv.innerHTML = text; } - - ResetProgress () - { - this.progressDiv.style.width = '0px'; - } - - SetProgress (ratio) - { - let progressWidth = 0; - if (ratio !== null) { - let contentDiv = this.GetContentDiv (); - let fullWidth = contentDiv.offsetWidth; - progressWidth = ratio * fullWidth; - } - this.progressDiv.style.width = progressWidth.toString () + 'px'; - } } export class ButtonDialog extends Dialog diff --git a/source/website/featureset.js b/source/website/featureset.js index b2be6c6..1590268 100644 --- a/source/website/featureset.js +++ b/source/website/featureset.js @@ -1,4 +1,4 @@ export const FeatureSet = { - DownloadProgress : true + }; diff --git a/source/website/threemodelloaderui.js b/source/website/threemodelloaderui.js index 7547e13..8e32afb 100644 --- a/source/website/threemodelloaderui.js +++ b/source/website/threemodelloaderui.js @@ -4,7 +4,6 @@ import { ShowMessageDialog } from './dialogs.js'; import { ButtonDialog, ProgressDialog } from './dialog.js'; import { AddSvgIconElement } from './utils.js'; import { ImportErrorCode } from '../engine/import/importer.js'; -import { FeatureSet } from './featureset.js'; export class ThreeModelLoaderUI { @@ -30,24 +29,10 @@ export class ThreeModelLoaderUI progressDialog.Open (); }, onFileListProgress : (current, total) => { - progressDialog.SetProgress (null); - if (FeatureSet.DownloadProgress) { - if (total > 1) { - progressDialog.SetText ('Loading File ' + (current + 1).toString () + '/' + total.toString ()); - } - } }, onFileLoadProgress : (current, total) => { - if (FeatureSet.DownloadProgress) { - if (total > 0) { - progressDialog.SetProgress (current / total); - } else { - progressDialog.SetProgress (null); - } - } }, onSelectMainFile : (fileNames, selectFile) => { - progressDialog.SetProgress (null); progressDialog.Close (); this.modalDialog = this.ShowFileSelectorDialog (fileNames, (index) => { progressDialog.Open (); @@ -55,11 +40,9 @@ export class ThreeModelLoaderUI }); }, onImportStart : () => { - progressDialog.SetProgress (null); progressDialog.SetText ('Importing Model'); }, onVisualizationStart : () => { - progressDialog.SetProgress (null); progressDialog.SetText ('Visualizing Model'); }, onModelFinished : (importResult, threeObject) => { diff --git a/website/css/dialogs.css b/website/css/dialogs.css index fccf682..8291f6d 100644 --- a/website/css/dialogs.css +++ b/website/css/dialogs.css @@ -219,17 +219,13 @@ div.ov_progress { color: var(--ov_dialog_foreground_color); background: var(--ov_dialog_background_color); + padding: 20px; text-align: center; width: 400px; box-shadow: var(--ov_shadow); border-radius: 5px; } -div.ov_progress_inner -{ - padding: 20px; -} - @keyframes ov_progress_img_kf { 0% { transform: rotate(0deg); @@ -246,10 +242,6 @@ div.ov_progress div.ov_progress_img svg margin-top: 5px; margin-bottom: 15px; display: inline-block; -} - -div.ov_progress div.ov_progress_img.animated svg -{ animation: ov_progress_img_kf 5.0s linear infinite; } @@ -259,13 +251,6 @@ div.ov_progress div.ov_progress_text text-align: center; } -div.ov_progress div.ov_progress_bar -{ - background: var(--ov_button_color); - width: 0px; - height: 3px; -} - div.ov_snapshot_dialog_left { width: 190px;