Commit 18918092 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph] left/right handed handled correctly

parent f54eb815
...@@ -34,6 +34,12 @@ ...@@ -34,6 +34,12 @@
background-color: #fff; background-color: #fff;
z-index: 1; z-index: 1;
} }
#graph-explorer .lefthanded .graph-tree {
left: 80%;
}
#graph-explorer .righthanded .graph-tree {
left: 0%;
}
#graph-explorer #graph-view { #graph-explorer #graph-view {
height: 95%; height: 95%;
} }
...@@ -43,7 +49,6 @@ ...@@ -43,7 +49,6 @@
top: 170px; top: 170px;
border: 1px white solid; border: 1px white solid;
background-color: white; background-color: white;
left: 70%;
width: 28%; width: 28%;
} }
#graph-explorer #sp-container #myTab { #graph-explorer #sp-container #myTab {
...@@ -58,6 +63,12 @@ ...@@ -58,6 +63,12 @@
display: inline; display: inline;
float: left; float: left;
} }
#graph-explorer .lefthanded #sp-container {
left: 0%;
}
#graph-explorer .righthanded #sp-container {
left: 70%;
}
#graph-explorer #tree { #graph-explorer #tree {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
......
...@@ -38,6 +38,10 @@ ...@@ -38,6 +38,10 @@
@include sidePanelCommon @include sidePanelCommon
background-color: #fff background-color: #fff
z-index: 1 z-index: 1
.lefthanded .graph-tree
left: 80%
.righthanded .graph-tree
left: 0%
#graph-view #graph-view
height: 95% height: 95%
...@@ -46,7 +50,6 @@ ...@@ -46,7 +50,6 @@
@include sidePanelCommon @include sidePanelCommon
border: 1px white solid border: 1px white solid
background-color: white background-color: white
left: 70%
width: 28% width: 28%
#myTab #myTab
...@@ -61,6 +64,10 @@ ...@@ -61,6 +64,10 @@
ul ul
display: inline display: inline
float : left float : left
.lefthanded #sp-container
left: 0%
.righthanded #sp-container
left: 70%
#tree #tree
position: absolute position: absolute
......
...@@ -14,16 +14,8 @@ ...@@ -14,16 +14,8 @@
cursor: wait; cursor: wait;
} }
.tree .node { .tree .node {
padding-left: 10px;
margin-top: 1px; margin-top: 1px;
} }
.tree .node .name.clickable {
color: #337ab7;
cursor: pointer;
}
.tree .node .name.clickable:hover {
text-decoration: underline;
}
.tree .lefthanded ul { .tree .lefthanded ul {
margin-right: 19px; margin-right: 19px;
} }
......
...@@ -45,7 +45,6 @@ type LayoutProps = ...@@ -45,7 +45,6 @@ type LayoutProps =
, session :: Session , session :: Session
, sessions :: Sessions , sessions :: Sessions
, showLogin :: R.State Boolean , showLogin :: R.State Boolean
--, treeReload :: R.State Int
) )
type Props = ( type Props = (
...@@ -72,7 +71,7 @@ explorerLayoutView :: R.State Int -> Record LayoutProps -> R.Element ...@@ -72,7 +71,7 @@ explorerLayoutView :: R.State Int -> Record LayoutProps -> R.Element
explorerLayoutView graphVersion p = R.createElement el p [] explorerLayoutView graphVersion p = R.createElement el p []
where where
el = R.hooksComponent "G.C.GE.explorerLayoutView" cpt el = R.hooksComponent "G.C.GE.explorerLayoutView" cpt
cpt props@{graphId, session} _ = do cpt props@{ graphId, session } _ = do
useLoader graphId (getNodes session graphVersion) handler useLoader graphId (getNodes session graphVersion) handler
where where
handler loaded = handler loaded =
...@@ -99,7 +98,6 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -99,7 +98,6 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
, session , session
, sessions , sessions
, showLogin , showLogin
--, treeReload
} _ = do } _ = do
let startForceAtlas = maybe true (\(GET.MetaData { startForceAtlas }) -> startForceAtlas) mMetaData let startForceAtlas = maybe true (\(GET.MetaData { startForceAtlas }) -> startForceAtlas) mMetaData
...@@ -146,13 +144,13 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -146,13 +144,13 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
, col [ spaces [ Toggle.sidebarToggleButton controls.showSidePanel ]] , col [ spaces [ Toggle.sidebarToggleButton controls.showSidePanel ]]
], R2.row ], R2.row
[ outer [ outer
[ inner [ inner handed
[ rowControls [ Controls.controls controls ] [ rowControls [ Controls.controls controls ]
, R2.row $ mainLayout handed $ , R2.row $ mainLayout handed $
tree { frontends tree { frontends
, handed , handed
, mCurrentRoute , mCurrentRoute
, reload: props.treeReload , reload: treeReload
, sessions , sessions
, show: fst controls.showTree , show: fst controls.showTree
, showLogin: snd showLogin } , showLogin: snd showLogin }
...@@ -187,7 +185,11 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -187,7 +185,11 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
mainLayout Types.LeftHanded (tree' /\ gc /\ gv /\ sdb) = [sdb, gc, gv, tree'] mainLayout Types.LeftHanded (tree' /\ gc /\ gv /\ sdb) = [sdb, gc, gv, tree']
outer = RH.div { className: "col-md-12" } outer = RH.div { className: "col-md-12" }
inner = RH.div { className: "container-fluid", style: { paddingTop: "90px" } } inner h = RH.div { className: "container-fluid " <> hClass, style: { paddingTop: "90px" } }
where
hClass = case h of
Types.LeftHanded -> "lefthanded"
Types.RightHanded -> "righthanded"
rowToggle = RH.div { id: "toggle-container" } rowToggle = RH.div { id: "toggle-container" }
rowControls = RH.div { id: "controls-container" } rowControls = RH.div { id: "controls-container" }
col = RH.div { className: "col-md-4" } col = RH.div { className: "col-md-4" }
......
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