From e873f9cd4ebaf0a011caafeb1c15d1ab4e49543a Mon Sep 17 00:00:00 2001
From: Viktor Kovacs
Date: Tue, 18 May 2021 17:06:48 +0200
Subject: [PATCH] Add experimental dialog for quantities.
---
tools/config.json | 4 +
website/embed.html | 4 +
website/index.html | 4 +
website/info/index.html | 7 +
website/o3dv/dialogs.js | 241 +------------------------------
website/o3dv/openurldialog.js | 56 +++++++
website/o3dv/quantitiesdialog.js | 43 ++++++
website/o3dv/settingsdialog.js | 36 +++++
website/o3dv/sharingdialog.js | 145 +++++++++++++++++++
website/o3dv/website.js | 6 +
10 files changed, 307 insertions(+), 239 deletions(-)
create mode 100644 website/o3dv/openurldialog.js
create mode 100644 website/o3dv/quantitiesdialog.js
create mode 100644 website/o3dv/settingsdialog.js
create mode 100644 website/o3dv/sharingdialog.js
diff --git a/tools/config.json b/tools/config.json
index 368d2b6..7322743 100644
--- a/tools/config.json
+++ b/tools/config.json
@@ -60,7 +60,11 @@
"website/o3dv/treeview.js",
"website/o3dv/modal.js",
"website/o3dv/dialogs.js",
+ "website/o3dv/openurldialog.js",
"website/o3dv/exportdialog.js",
+ "website/o3dv/sharingdialog.js",
+ "website/o3dv/settingsdialog.js",
+ "website/o3dv/quantitiesdialog.js",
"website/o3dv/modeldata.js",
"website/o3dv/info.js",
"website/o3dv/menu.js",
diff --git a/website/embed.html b/website/embed.html
index 2c2a928..02704e0 100644
--- a/website/embed.html
+++ b/website/embed.html
@@ -74,7 +74,11 @@
+
+
+
+
diff --git a/website/index.html b/website/index.html
index ee66f05..00cbde8 100644
--- a/website/index.html
+++ b/website/index.html
@@ -74,7 +74,11 @@
+
+
+
+
diff --git a/website/info/index.html b/website/info/index.html
index 6e73074..4ef49a2 100644
--- a/website/info/index.html
+++ b/website/info/index.html
@@ -35,6 +35,7 @@
Loading models hosted on a web server
Missing files
+ Generate sharing link
Embedding the viewer
- Embedding models hosted on GitHub
@@ -177,6 +178,12 @@
files, or just import the missing files on their own.
+ Generate sharing link
+
+ You can generate sharing link to make it easy to share your models. It works only if your models are hosted on a web server.
+ To get the sharing link, click on the share model button (
) in the toolbar.
+
+
Embedding the viewer
The website allows you to embed a 3D model in your page. It works only if your models are hosted on a web server.
diff --git a/website/o3dv/dialogs.js b/website/o3dv/dialogs.js
index 42310f4..0ef47b5 100644
--- a/website/o3dv/dialogs.js
+++ b/website/o3dv/dialogs.js
@@ -1,6 +1,7 @@
OV.FeatureSet =
{
- SetDefaultColor : false
+ SetDefaultColor : false,
+ ModelQuantities : false
};
OV.ShowMessageDialog = function (title, message, subMessage)
@@ -22,244 +23,6 @@ OV.ShowMessageDialog = function (title, message, subMessage)
return dialog;
};
-OV.ShowOpenUrlDialog = function (onOk)
-{
- function CorrectFileHostUrls (urls)
- {
- for (let i = 0; i < urls.length; i++) {
- let url = urls[i];
- if (url.search (/www\.dropbox\.com/u) !== -1) {
- url = url.replace ('www.dropbox.com', 'dl.dropbox.com');
- let separatorPos = url.indexOf ('?');
- if (separatorPos !== -1) {
- url = url.substr (0, separatorPos);
- }
- urls[i] = url;
- } else if (url.search (/github\.com/u) !== -1) {
- url = url.replace ('github.com', 'raw.githubusercontent.com');
- url = url.replace ('/blob', '');
- let separatorPos = url.indexOf ('?');
- if (separatorPos !== -1) {
- url = url.substr (0, separatorPos);
- }
- urls[i] = url;
- }
- }
- }
-
- let dialog = new OV.ButtonDialog ();
- let urlsTextArea = $('