').addClass ('ov_sidebar_content').addClass ('ov_thin_scrollbar').appendTo (parentDiv);
}
-
+ AddProperties (properties)
+ {
+ function AddProperty (table, name, value)
+ {
+ let row = $('
').appendTo (table);
+ let nameColum = $('| ').addClass ('ov_property_table_name').appendTo (row);
+ let valueColumn = $(' | ').addClass ('ov_property_table_value').appendTo (row);
+ nameColum.html (name).attr ('title', name);
+ valueColumn.html (value).attr ('title', value);
+ }
+
+ this.Clear ();
+ let table = $('').addClass ('ov_property_table').appendTo (this.contentDiv);
+ AddProperty (table, 'Vertex Count', '1245');
+ AddProperty (table, 'Triangle Count', '23466');
+ AddProperty (table, 'Size', '12.0 x 14.0 x 6.0');
+ AddProperty (table, 'Volume', '23423');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Emission Texture', 'Very very long property value');
+ AddProperty (table, 'Very very long property name', 'Very very long property value');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ AddProperty (table, 'Surface Area', '45463');
+ this.Resize ();
+ }
+
+ Resize ()
+ {
+ let titleHeight = this.titleDiv.outerHeight (true);
+ let height = this.parentDiv.height ();
+ this.contentDiv.outerHeight (height - titleHeight, true);
+ }
+
+ Clear ()
+ {
+ this.contentDiv.empty ();
+ }
};
diff --git a/website/o3dv/website.css b/website/o3dv/website.css
index a520a5a..0551eeb 100644
--- a/website/o3dv/website.css
+++ b/website/o3dv/website.css
@@ -131,7 +131,7 @@ div.main_viewer
div.main_sidebar
{
- width: 240px;
+ width: 300px;
margin: 10px 10px 10px 0px;
overflow: none;
float: right;
@@ -259,6 +259,11 @@ div.ov_sidebar_title
border-bottom: 1px solid #dddddd;
}
+div.ov_sidebar_content
+{
+ overflow: auto;
+}
+
div.ov_tree_view
{
user-select: none;
@@ -566,22 +571,6 @@ div.ov_popup
border-radius: 5px;
}
-div.ov_popup div.ov_popup_title
-{
- font-weight: bold;
- margin-top: 15px;
- margin-bottom: 10px;
- margin-left: 10px;
- margin-right: 10px;
-}
-
-div.ov_popup div.ov_popup_text
-{
- margin-bottom: 15px;
- margin-left: 10px;
- margin-right: 10px;
-}
-
div.ov_popup div.ov_popup_list
{
max-height: 200px;
@@ -635,6 +624,32 @@ div.ov_progress div.ov_progress_text
text-align: center;
}
+table.ov_property_table
+{
+ border-collapse: collapse;
+}
+
+table.ov_property_table td
+{
+ padding: 4px 0px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ display: inline-block;
+}
+
+table.ov_property_table td.ov_property_table_name
+{
+ width: 45%;
+ padding-right: 8%;
+}
+
+table.ov_property_table td.ov_property_table_value
+{
+ width: 45%;
+ text-align: right;
+}
+
div.ov_thin_scrollbar
{
scrollbar-color: #cccccc transparent;
diff --git a/website/o3dv/website.js b/website/o3dv/website.js
index 042f29f..8e6b102 100644
--- a/website/o3dv/website.js
+++ b/website/o3dv/website.js
@@ -61,9 +61,11 @@ OV.Website = class
let contentWidth = windowWidth - navigatorWidth - sidebarWidth - safetyMargin;
let contentHeight = windowHeight - headerHeight - safetyMargin;
this.parameters.navigatorDiv.outerHeight (contentHeight, true);
+ this.parameters.sidebarDiv.outerHeight (contentHeight, true);
this.parameters.introDiv.outerHeight (contentHeight, true);
this.navigator.Resize ();
+ this.sidebar.Resize ();
this.viewer.Resize (contentWidth, contentHeight);
}
|