Commit 28929fe4 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[CLEAN] FIXME: subtree needs a shape

parent cfae041b
......@@ -10,14 +10,7 @@
&.disabled
cursor: wait
.node
padding-left: 10px
margin-top: 1px
.name
&.clickable
color: #337ab7
cursor: pointer
&:hover
text-decoration: underline
.lefthanded
ul
margin-right : 19px
......
......@@ -37,8 +37,7 @@ mergeNodeCpt = R.hooksComponent "G.C.F.T.N.A.M.mergeNode" cpt
Nothing -> H.div {} []
_ -> H.div {} []
pure $ panel [
subTreeView { action
pure $ panel [ subTreeView { action
, dispatch
, id
, nodeType
......
......@@ -83,13 +83,14 @@ subTreeViewLoaded props = R.createElement subTreeViewLoadedCpt props []
subTreeViewLoadedCpt :: R.Component CorpusTreeProps
subTreeViewLoadedCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeViewLoadedCpt" cpt
where
cpt p@{dispatch, id, nodeType, session, tree} _ = do
pure $ H.div {className:"panel panel-primary"}
[H.div { className: "tree" }
[ H.div { className: "" }
cpt p@{dispatch, id, nodeType, session, tree, handed} _ = do
pure $ H.div {className:"tree"}
[H.div { className: if handed == GT.RightHanded
then "righthanded"
else "lefthanded"
}
[ subTreeTreeView p ]
]
]
subTreeTreeView :: Record CorpusTreeProps -> R.Element
subTreeTreeView props = R.createElement subTreeTreeViewCpt props []
......@@ -113,13 +114,14 @@ subTreeTreeViewCpt = R.hooksComponent "G.C.F.T.N.A.U.subTreeTreeViewCpt" cpt
GT.LeftHanded -> A.reverse
GT.RightHanded -> identity
pure $ H.div { className: if handed == GT.RightHanded
then "righthanded"
else "lefthanded"
} $ (ordering [ H.div { className: "node " <> GT.fldr nodeType true} []
pure $ H.div {} $ (ordering [ H.div { className: "node " <> GT.fldr nodeType true} []
, H.span { style : if validNodeType
then { color : "blue", "text-decoration": "underline"}
else { color : "" , "text-decoration": "none"}
then { color : "blue"
, "text-decoration": "underline"
}
else { color : ""
, "text-decoration": "none"
}
, on: { click: onClick }
}
[ nodeText { isSelected: isSelected targetId valAction
......
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