Modify navigator style sheet.
This commit is contained in:
parent
d8d4d1fb3e
commit
d49b19c32e
@ -1,7 +1,5 @@
|
||||
div.ov_panel_set_menu
|
||||
{
|
||||
margin-right: 10px;
|
||||
border-right: 1px solid var(--ov_border_color);
|
||||
float: left;
|
||||
}
|
||||
|
||||
@ -11,6 +9,13 @@ div.ov_panel_set_menu div.ov_panel_set_menu_button
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.ov_panel_set_content
|
||||
{
|
||||
padding-left: 10px;
|
||||
border-left: 1px solid var(--ov_border_color);
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@media (hover)
|
||||
{
|
||||
|
||||
|
||||
@ -104,7 +104,7 @@ div.main
|
||||
div.main_navigator
|
||||
{
|
||||
width: 240px;
|
||||
margin: 10px 0px 10px 10px;
|
||||
margin: 10px 0px 10px 0px;
|
||||
overflow: none;
|
||||
float: left;
|
||||
}
|
||||
|
||||
@ -157,8 +157,14 @@ OV.Navigator = class
|
||||
{
|
||||
if (selection.type === OV.SelectionType.Material) {
|
||||
navigator.materialsPanel.GetMaterialItem (selection.materialIndex).SetSelected (select);
|
||||
if (select) {
|
||||
navigator.panelSet.ShowPanel (navigator.materialsPanel);
|
||||
}
|
||||
} else if (selection.type === OV.SelectionType.Mesh) {
|
||||
navigator.meshesPanel.GetMeshItem (selection.meshInstanceId).SetSelected (select);
|
||||
if (select) {
|
||||
navigator.panelSet.ShowPanel (navigator.meshesPanel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ OV.Panel = class
|
||||
constructor (parentDiv)
|
||||
{
|
||||
this.parentDiv = parentDiv;
|
||||
this.panelDiv = $('<div>').appendTo (parentDiv);
|
||||
this.visible = true;
|
||||
this.panelDiv = $('<div>').appendTo (parentDiv).hide ();
|
||||
this.visible = false;
|
||||
}
|
||||
|
||||
GetIcon ()
|
||||
@ -17,6 +17,11 @@ OV.Panel = class
|
||||
return this.panelDiv;
|
||||
}
|
||||
|
||||
IsVisible ()
|
||||
{
|
||||
return this.visible;
|
||||
}
|
||||
|
||||
Show (show)
|
||||
{
|
||||
this.visible = show;
|
||||
@ -44,7 +49,7 @@ OV.PanelSet = class
|
||||
{
|
||||
this.parentDiv = parentDiv;
|
||||
this.menuDiv = $('<div>').addClass ('ov_panel_set_menu').appendTo (parentDiv);
|
||||
this.contentDiv = $('<div>').appendTo (parentDiv);
|
||||
this.contentDiv = $('<div>').addClass ('ov_panel_set_content').appendTo (parentDiv);
|
||||
this.panels = [];
|
||||
}
|
||||
|
||||
@ -71,6 +76,16 @@ OV.PanelSet = class
|
||||
panel.Resize ();
|
||||
}
|
||||
|
||||
GetVisiblePanel ()
|
||||
{
|
||||
for (let panel of this.panels) {
|
||||
if (panel.IsVisible ()) {
|
||||
return panel;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Resize ()
|
||||
{
|
||||
let height = this.parentDiv.height ();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user