Commit f0f46d05 authored by Romain Loth's avatar Romain Loth

Merge commit '48df7d5' (minor fixes for tina search labels and selection tabs)

parents 43d8dcfd f20524d4
......@@ -447,18 +447,14 @@
<ul class='etabs'>
<!-- for related elements from the combined graph (eg soc => sem) -->
<li id="taboppos" class='tab'><a href="#tabs1">Opposite-Neighbors</a></li>
<li id="taboppos" class='tab'><a href="#oppositeNodes">Opposite-Neighbors</a></li>
<!-- for neighbors within this graph -->
<li id="tabneigh" class='tab'><a href="#tabs2">Related</a></li>
<li id="tabneigh" class='tab'><a href="#sameNodes">Related</a></li>
</ul>
<div class='panel-container'>
<div id="tabs1">
<div id="oppositeNodes"></div>
</div>
<div id="tabs2">
<div id="sameNodes"></div>
</div>
</div>
</div>
......
......@@ -449,7 +449,7 @@ function changeType(optionaltypeFlag) {
// 7 - add the relations
let newEdges = {}
let allNodes = TW.partialGraph
let allNodes = {}
if (typeFlag != "all") allNodes = newNodes
else allNodes = Object.assign(newNodes, preservedNodes)
for (var srcnid in allNodes) {
......@@ -501,6 +501,13 @@ function changeType(optionaltypeFlag) {
console.log("selection transitive projection from",sourceNids, "to", newselsArr)
}
// update search labels
TW.labels.splice(0, TW.labels.length)
for (var nid in allNodes) {
updateSearchLabels(nid,allNodes[nid].label,allNodes[nid].type);
}
// update the gui (POSS could be handled by TW.pushGUIState)
TW.gui.handpickedcolor = false
changeGraphAppearanceByFacets( getActivetypesNames() )
......
......@@ -507,15 +507,25 @@ function updateRelatedNodesPanel( sels , same, oppos ) {
informationDIV += htmlfied_nodesatts( sels ).join("<br>\n")
informationDIV += '</ul><br>';
//using the readmore.js (NB readmore and easytabs are not easy to harmonize)
// selection panels and tabs
$("#lefttopbox").show();
$("#selection-tabs-contnr").show();
$("#names").html(namesDIV).readmore({maxHeight:100});
$("#information").html(informationDIV);
// easytab + readmore needs "click" on active tab to update HTML correctly
let tabAnchors = document.querySelectorAll('.etabs > li > a')
for (var i = 0 ; i < tabAnchors.length ; i++) {
if (tabAnchors[i] && tabAnchors[i].classList.contains("active"))
$('#selection-tabs-contnr').easytabs(
'select', tabAnchors[i].getAttribute('href')
);
}
if(oppos.length>0) {
$("#oppositeNodes").html(alterNodesDIV).readmore({maxHeight:200});
}
$("#sameNodes").html(sameNodesDIV).readmore({maxHeight:200});
$("#information").html(informationDIV);
if (TW.conf.getRelatedDocs) {
let rdTabCount = 0
......
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