diff --git a/tools/config.json b/tools/config.json index cda65a2..7956acc 100644 --- a/tools/config.json +++ b/tools/config.json @@ -56,6 +56,7 @@ "source/viewer/domviewer.js" ], "website_files" : [ + "website/o3dv/featureset.js", "website/o3dv/utils.js", "website/o3dv/toolbar.js", "website/o3dv/treeview.js", diff --git a/website/embed.html b/website/embed.html index 1fcf68b..afd98ff 100644 --- a/website/embed.html +++ b/website/embed.html @@ -70,6 +70,7 @@ + diff --git a/website/index.html b/website/index.html index a5ec717..fbfdfd1 100644 --- a/website/index.html +++ b/website/index.html @@ -70,6 +70,7 @@ + diff --git a/website/o3dv/dialogs.js b/website/o3dv/dialogs.js index 0ef47b5..22ab59f 100644 --- a/website/o3dv/dialogs.js +++ b/website/o3dv/dialogs.js @@ -1,9 +1,3 @@ -OV.FeatureSet = -{ - SetDefaultColor : false, - ModelQuantities : false -}; - OV.ShowMessageDialog = function (title, message, subMessage) { let dialog = new OV.ButtonDialog (); @@ -28,8 +22,8 @@ OV.ShowListPopup = function (button, items, callbacks) let popup = new OV.ListPopup (); popup.SetCustomResizeHandler (function (modalDiv) { let offset = button.offset (); - let left = offset.left + button.outerWidth (true); - let bottom = offset.top + button.outerHeight (true); + let left = offset.left + button.outerWidth (false); + let bottom = offset.top + button.outerHeight (false); modalDiv.offset ({ left : left, top : bottom - modalDiv.outerHeight (true) diff --git a/website/o3dv/featureset.js b/website/o3dv/featureset.js new file mode 100644 index 0000000..a20bdd7 --- /dev/null +++ b/website/o3dv/featureset.js @@ -0,0 +1,5 @@ +OV.FeatureSet = +{ + SetDefaultColor : false, + ModelQuantities : false +}; diff --git a/website/o3dv/quantitiesdialog.js b/website/o3dv/quantitiesdialog.js index 3a00b75..2bda292 100644 --- a/website/o3dv/quantitiesdialog.js +++ b/website/o3dv/quantitiesdialog.js @@ -1,5 +1,12 @@ OV.ShowQuantitiesDialog = function (model) { + function AddTableRow (table, name, value) + { + let row = $('').appendTo (table); + $('').html (name).appendTo (row); + $('').addClass ('right').html (value).appendTo (row); + } + if (model === null) { return OV.ShowMessageDialog ( 'Quantity Calculation Failed', @@ -32,9 +39,10 @@ OV.ShowQuantitiesDialog = function (model) } else { volumeString = volume.toFixed (5); } - const surfaceAreaString = surfaceArea.toFixed (5); - $('
').html ('Volume: ' + volumeString).appendTo (contentDiv); - $('
').html ('Surface Area: ' + surfaceAreaString).appendTo (contentDiv); + let surfaceAreaString = surfaceArea.toFixed (5); + let table = $('').addClass ('ov_dialog_table').appendTo (contentDiv); + AddTableRow (table, 'Volume', volumeString); + AddTableRow (table, 'Surface Area', surfaceAreaString); dialog.Show (); diff --git a/website/o3dv/website.css b/website/o3dv/website.css index a7a6bc9..0fb7f27 100644 --- a/website/o3dv/website.css +++ b/website/o3dv/website.css @@ -265,8 +265,8 @@ div.ov_menu_info_panel div.ov_info_box_details div.ov_menu_info_panel div.ov_info_box_row { - overflow: auto; padding: 2px 0px; + overflow: auto; } div.ov_menu_info_panel div.ov_info_box_row_name @@ -301,6 +301,7 @@ div.ov_menu_info_panel div.ov_info_box_rgbtext div.ov_menu_info_panel div.ov_info_box_button { cursor: pointer; + margin-top: 10px; border: 1px solid #dddddd; border-radius: 5px; overflow: auto; @@ -601,6 +602,23 @@ div.ov_dialog input.ov_dialog_checkradio margin-right: 10px; } +div.ov_dialog table.ov_dialog_table +{ + width: 100%; + border-collapse: collapse; +} + +div.ov_dialog table.ov_dialog_table td +{ + padding: 5px 10px; + border: 1px solid #dddddd; +} + +div.ov_dialog table.ov_dialog_table td.right +{ + text-align: right; +} + div.ov_popup { background: #ffffff;