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

[CLEAN] FIXME: subtree needs a shape

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