From a99730a95f048290135afd812c3071e3f54c9562 Mon Sep 17 00:00:00 2001 From: Viktor Kovacs Date: Wed, 14 Apr 2021 19:51:20 +0200 Subject: [PATCH] Copy sharing url. --- .../images/toolbar/{embed.svg => share.svg} | 0 website/info/index.html | 6 +- website/o3dv/dialogs.js | 129 ++++++++++++------ website/o3dv/exportdialog.js | 2 +- website/o3dv/website.css | 48 ++++++- website/o3dv/website.js | 4 +- 6 files changed, 140 insertions(+), 49 deletions(-) rename website/assets/images/toolbar/{embed.svg => share.svg} (100%) diff --git a/website/assets/images/toolbar/embed.svg b/website/assets/images/toolbar/share.svg similarity index 100% rename from website/assets/images/toolbar/embed.svg rename to website/assets/images/toolbar/share.svg diff --git a/website/info/index.html b/website/info/index.html index 5a994b3..33a567a 100644 --- a/website/info/index.html +++ b/website/info/index.html @@ -173,7 +173,7 @@

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. - To get the embedding code, click on the embedding button () in the toolbar. + To get the embedding code, click on the share model button () in the toolbar.

Embedding models hosted on GitHub

@@ -191,7 +191,7 @@ https://github.com/kovacsv/Online3DViewer/blob/master/test/testfiles/3ds/texture.png -
  • Click on OK, and if the model is loaded, click on the embed button in the toolbar ().
  • +
  • Click on OK, and if the model is loaded, click on the share button in the toolbar ().
  • @@ -210,7 +210,7 @@ https://www.dropbox.com/s/6dfk1jveevbofxm/texture.png?dl=0 -
  • Click on OK, and if the model is loaded, click on the embed button in the toolbar ().
  • +
  • Click on OK, and if the model is loaded, click on the share button in the toolbar ().
  • diff --git a/website/o3dv/dialogs.js b/website/o3dv/dialogs.js index 2cb6822..426c1b7 100644 --- a/website/o3dv/dialogs.js +++ b/website/o3dv/dialogs.js @@ -77,18 +77,27 @@ OV.ShowOpenUrlDialog = function (onOk) return dialog; }; -OV.ShowEmbeddingDialog = function (importer, importSettings, camera) +OV.ShowSharingDialog = function (importer, importSettings, camera) { - function AddCheckboxLine (parentDiv, text, onChange) + function AddCheckboxLine (parentDiv, text, id, onChange) { let line = $('
    ').addClass ('ov_dialog_table_row').appendTo (parentDiv); - let check = $('').attr ('type', 'checkbox').attr ('checked', 'true').appendTo (line); - $('').html (text).appendTo (line); + let check = $('').attr ('type', 'checkbox').attr ('checked', 'true').addClass ('ov_dialog_checkradio').attr ('id', id).appendTo (line); + $('