Commit db9ffc69 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Graph] fixes to tree/controls/sidebar layout

Now opening one of them doesn't move the graph.
parent b083b6c3
...@@ -10,6 +10,16 @@ ...@@ -10,6 +10,16 @@
display: flex; display: flex;
max-width: 200px; max-width: 200px;
} }
#graph-explorer .row.controls {
height: 79px;
}
#graph-explorer .graph-tree {
position: absolute;
top: 120px;
max-height: 600px;
overflow-y: scroll;
z-index: 1;
}
#graph-explorer #sp-container { #graph-explorer #sp-container {
position: absolute; position: absolute;
left: 70%; left: 70%;
...@@ -17,6 +27,8 @@ ...@@ -17,6 +27,8 @@
z-index: 1; z-index: 1;
border: 1px white solid; border: 1px white solid;
background-color: white; background-color: white;
max-height: 600px;
overflow-y: scroll;
} }
#graph-explorer #sp-container #myTab { #graph-explorer #sp-container #myTab {
marginBottom: 18px; marginBottom: 18px;
......
...@@ -9,6 +9,15 @@ ...@@ -9,6 +9,15 @@
li li
display: flex display: flex
max-width: 200px max-width: 200px
.row.controls
height: 79px
.graph-tree
position: absolute
top: 120px
max-height: 600px
overflow-y: scroll
z-index: 1
#sp-container #sp-container
position: absolute position: absolute
...@@ -17,6 +26,8 @@ ...@@ -17,6 +26,8 @@
z-index: 1 z-index: 1
border: 1px white solid border: 1px white solid
background-color: white background-color: white
max-height: 600px
overflow-y: scroll
#myTab #myTab
marginBottom: 18px marginBottom: 18px
......
...@@ -108,7 +108,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -108,7 +108,7 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
, col [ Toggle.controlsToggleButton controls.showControls ] , col [ Toggle.controlsToggleButton controls.showControls ]
, col [ pullRight [ Toggle.sidebarToggleButton controls.showSidePanel ] ] , col [ pullRight [ Toggle.sidebarToggleButton controls.showSidePanel ] ]
] ]
, row [ Controls.controls controls ] , rowControls [ Controls.controls controls ]
, row [ tree (fst controls.showTree) {sessions, mCurrentRoute, frontends} (snd showLogin) , row [ tree (fst controls.showTree) {sessions, mCurrentRoute, frontends} (snd showLogin)
, RH.div { ref: graphRef, id: "graph-view", className: graphClassName controls, style: {height: "95%"} } [] -- graph container , RH.div { ref: graphRef, id: "graph-view", className: graphClassName controls, style: {height: "95%"} } [] -- graph container
, graphView { controls , graphView { controls
...@@ -117,29 +117,29 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -117,29 +117,29 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
, graph , graph
, multiSelectEnabledRef , multiSelectEnabledRef
} }
, mSidebar graph mMetaData { frontends , mSidebar mMetaData { frontends
, session , graph
, selectedNodeIds: controls.selectedNodeIds , session
, showSidePanel: fst controls.showSidePanel , selectedNodeIds: controls.selectedNodeIds
} , showSidePanel: fst controls.showSidePanel
}
] ]
, row [
]
] ]
] ]
] ]
] ]
graphClassName :: Record Controls.Controls -> String graphClassName :: Record Controls.Controls -> String
graphClassName {showSidePanel: (GET.Opened /\ _), showTree: (true /\ _)} = "col-md-8" --graphClassName {showSidePanel: (GET.Opened /\ _), showTree: (true /\ _)} = "col-md-8"
graphClassName {showTree: (true /\ _)} = "col-md-10" --graphClassName {showTree: (true /\ _)} = "col-md-10"
graphClassName {showSidePanel: (GET.Opened /\ _)} = "col-md-10" --graphClassName {showSidePanel: (GET.Opened /\ _)} = "col-md-10"
graphClassName _ = "col-md-12" graphClassName _ = "col-md-12"
outer = RH.div { className: "col-md-12" } outer = RH.div { className: "col-md-12" }
inner = RH.div { className: "container-fluid", style: { paddingTop: "90px" } } inner = RH.div { className: "container-fluid", style: { paddingTop: "90px" } }
row1 = RH.div { className: "row", style: { paddingBottom: "10px", marginTop: "-24px" } } row1 = RH.div { className: "row", style: { paddingBottom: "10px", marginTop: "-24px" } }
row = RH.div { className: "row" } row = RH.div { className: "row" }
rowControls = RH.div { className: "row controls" }
col = RH.div { className: "col-md-4" } col = RH.div { className: "col-md-4" }
pullLeft = RH.div { className: "pull-left" } pullLeft = RH.div { className: "pull-left" }
pullRight = RH.div { className: "pull-right" } pullRight = RH.div { className: "pull-right" }
...@@ -150,18 +150,17 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -150,18 +150,17 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
-> R.Element -> R.Element
tree false _ _ = RH.div { id: "tree" } [] tree false _ _ = RH.div { id: "tree" } []
tree true {sessions, mCurrentRoute: route, frontends} showLogin = tree true {sessions, mCurrentRoute: route, frontends} showLogin =
RH.div {className: "col-md-2", style: {paddingTop: "60px"}} RH.div {className: "col-md-2 graph-tree"} [forest {sessions, route, frontends, showLogin}]
[forest {sessions, route, frontends, showLogin}]
mSidebar :: SigmaxTypes.SGraph mSidebar :: Maybe GET.MetaData
-> Maybe GET.MetaData
-> { frontends :: Frontends -> { frontends :: Frontends
, graph :: SigmaxTypes.SGraph
, showSidePanel :: GET.SidePanelState , showSidePanel :: GET.SidePanelState
, selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds , selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds
, session :: Session } , session :: Session }
-> R.Element -> R.Element
mSidebar _ Nothing _ = RH.div {} [] mSidebar Nothing _ = RH.div {} []
mSidebar graph (Just metaData) {frontends, session, selectedNodeIds, showSidePanel} = mSidebar (Just metaData) {frontends, graph, session, selectedNodeIds, showSidePanel} =
Sidebar.sidebar { frontends Sidebar.sidebar { frontends
, graph , graph
, metaData , metaData
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment