Fixed the lenght of titles.
This commit is contained in:
parent
2e49a82938
commit
5b77944f97
|
@ -257,6 +257,9 @@ abstract class Map {
|
|||
$contants["DEFAULT_NODE_WIDTH"] = DEFAULT_NODE_WIDTH;
|
||||
$contants["DEFAULT_NODE_HEIGHT"] = DEFAULT_NODE_HEIGHT;
|
||||
|
||||
|
||||
$contants["GENERIC_SIZE_TEXT"] = GENERIC_SIZE_TEXT;
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<?php
|
||||
|
|
|
@ -454,7 +454,17 @@ class Networkmap extends Map {
|
|||
}
|
||||
|
||||
public function show() {
|
||||
$this->getNodes();
|
||||
foreach ($this->nodes as $i => $node) {
|
||||
$this->nodes[$i]['title'] =
|
||||
ui_print_truncate_text(
|
||||
$node['title'],
|
||||
GENERIC_SIZE_TEXT,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
'...',
|
||||
false);
|
||||
}
|
||||
|
||||
parent::show();
|
||||
}
|
||||
|
|
|
@ -901,7 +901,14 @@ NetworkmapController.prototype.paint_node = function(g_node, node) {
|
|||
|
||||
d3_node_title
|
||||
.text(node['title'])
|
||||
.style("fill", "#000000");
|
||||
.style("fill", "#000000")
|
||||
.style("font-size", "9px")
|
||||
.style("font-style", "normal")
|
||||
.style("font-weight", "normal")
|
||||
.style("line-height", "125%")
|
||||
.style("letter-spacing", "0px")
|
||||
.style("word-spacing", "0px")
|
||||
.style("font-family", "Sans");
|
||||
|
||||
//Title position
|
||||
var title_bbox = d3_node_title.node().getBBox();
|
||||
|
|
Loading…
Reference in New Issue