change tooltip content

master
zovjsra 1 year ago
parent 660460d01d
commit 42f30e4598

@ -135,15 +135,16 @@ function buildSentetree() {
});
tree.data(model.getRenderedGraphs(2))
.on('nodeMouseenter', (node) => {
console.log(node)
$('#nodeTitle').removeClass('hidden')
$('#nodeTitleContent').html(node.data.topEntries.map((n) => data[n.id].rawtxt).join('<br>'))
$('#nodeTitleContent').html('<ul>' + node.data.topEntries.map((n) => "<li>" + data[n.id].rawtxt + "</li>").join('') + "</ul>")
})
.on('nodeMouseleave', () => {
$('#nodeTitle').addClass('hidden')
})
.on('linkMouseenter', (node) => {
$('#nodeTitle').removeClass('hidden')
$('#nodeTitleContent').html('連線粗細:連接的兩個單詞同時出現的頻率<br>連線顏色同層級單詞為灰色連線,不同層級為橘色連線')
$('#nodeTitleContent').html('頻率:' + (node.freq / 10))
}).on('linkMouseleave', () => {
$('#nodeTitle').addClass('hidden')
})

Loading…
Cancel
Save