mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
fix: fit node labels inside nodes
This commit is contained in:
@@ -7,12 +7,12 @@ var network_style = [
|
|||||||
selector: 'node[name]',
|
selector: 'node[name]',
|
||||||
style: {
|
style: {
|
||||||
label: 'data(name)',
|
label: 'data(name)',
|
||||||
width: '50px',
|
width: '100px',
|
||||||
height: '50px',
|
height: '100px',
|
||||||
'text-halign': 'center',
|
'text-halign': 'center',
|
||||||
'text-valign': 'center',
|
'text-valign': 'center',
|
||||||
'text-wrap': 'wrap',
|
'text-wrap': 'wrap',
|
||||||
'text-max-width': '100px',
|
'text-max-width': '90px',
|
||||||
'font-size': 12,
|
'font-size': 12,
|
||||||
'background-color': 'data(nodeColor)',
|
'background-color': 'data(nodeColor)',
|
||||||
'shape': 'data(nodeShape)'
|
'shape': 'data(nodeShape)'
|
||||||
@@ -58,7 +58,7 @@ function get_network() {
|
|||||||
name: person.name,
|
name: person.name,
|
||||||
kind: 'person',
|
kind: 'person',
|
||||||
nodeColor: '#0099cc',
|
nodeColor: '#0099cc',
|
||||||
nodeShape: 'elipse'
|
nodeShape: 'ellipse'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -89,6 +89,9 @@ function get_network() {
|
|||||||
id: 'relationship-' + relationship.pk.toString(),
|
id: 'relationship-' + relationship.pk.toString(),
|
||||||
source: 'person-' + relationship.source.pk.toString(),
|
source: 'person-' + relationship.source.pk.toString(),
|
||||||
target: 'person-' + relationship.target.pk.toString(),
|
target: 'person-' + relationship.target.pk.toString(),
|
||||||
|
lineColor: {
|
||||||
|
'organisation-membership': '#669933'
|
||||||
|
}[relationship.kind] || 'grey',
|
||||||
lineArrowShape: 'triangle'
|
lineArrowShape: 'triangle'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user