summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2016-05-29 18:10:15 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2016-05-29 18:10:15 +0200
commita7889db127f8c15a6609ed2344e94d0a9f068a9e (patch)
tree317d4970fb61d98ca817dfba61a6b1edd06889af
parentd377a9a33705e6f51011ab46a685b386a4daeef2 (diff)
downloadchd_gestion-a7889db127f8c15a6609ed2344e94d0a9f068a9e.zip
chd_gestion-a7889db127f8c15a6609ed2344e94d0a9f068a9e.tar.gz
chd_gestion-a7889db127f8c15a6609ed2344e94d0a9f068a9e.tar.bz2
Reduce overall width with line breaks and font size
-rw-r--r--api/img_adt_svc_relais.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/api/img_adt_svc_relais.php b/api/img_adt_svc_relais.php
index a8ee294..f1f9d1b 100644
--- a/api/img_adt_svc_relais.php
+++ b/api/img_adt_svc_relais.php
@@ -60,6 +60,12 @@ EOD;
function node_adt($adherent_id, $shape, $adt, $adt_title) {
$adt_title = htmlentities($adt_title);
+ foreach ( [ 10, 30 ] as $limit ) {
+ $breakpos = strpos($adt_title, ' ', $limit);
+ if ( $breakpos !== FALSE ) {
+ $adt_title = substr($adt_title, 0, $breakpos) . '<br/>' . substr($adt_title, $breakpos);
+ }
+ }
return <<<EOD
"a$adherent_id" [ margin=0, shape=$shape, label=<
<TABLE border="0" cellborder="0">
@@ -79,7 +85,7 @@ function node_equipement($eid, $img, $label, $ip) {
"e$eid" [ margin=0, shape=none, label=<
<TABLE border="0" cellborder="0">
<TR><TD><IMG SRC="icons/$img"/></TD></TR>
- <TR><TD>$label<br/><font point-size="8">$sub</font></TD></TR>
+ <TR><TD><font point-size="11">$label</font><br/><font point-size="8">$sub</font></TD></TR>
</TABLE>
>, URL="/gestion/equipements/view/$eid"];