root/components/umlSequenceDiagram/UmlSequenceDiagramPrinterToHtml.class.php
| 182 | 183 | ||
|---|---|---|---|
437 | return $strMessages; | 437 | return $strMessages; |
438 | } | 438 | } |
439 | 439 | ||
440 | /** | ||
441 | * Get the html of a note element | ||
442 | * | ||
443 | * @param UmlSequenceDiagramNote $objNote | ||
444 | * @param boolean $booAfter | ||
445 | * @return string | ||
446 | */ | ||
440 | protected function getNote( UmlSequenceDiagramNote $objNote , $booAfter = true ) | 447 | protected function getNote( UmlSequenceDiagramNote $objNote , $booAfter = true ) |
441 | { | 448 | { |
442 | $arrActors = $objNote->getActor()->getUmlSequenceDiagram()->getActors(); | 449 | $arrActors = $objNote->getActor()->getUmlSequenceDiagram()->getActors(); |
... | ... | ||
467 | $strResult .= $this->getTemplate( "line_before.html" , $arrReplace ); | 474 | $strResult .= $this->getTemplate( "line_before.html" , $arrReplace ); |
468 | } | 475 | } |
469 | elseif( $objActor->getPosition() == $intPosition ) | 476 | elseif( $objActor->getPosition() == $intPosition ) |
470 | { | 477 | { |
471 | $strContent = $objNote->getContent(); | 478 | $strContent = $objNote->getContent(); |
472 | $intMaxSize = 30; | 479 | $intMaxSize = 30; |
473 | if( strlen( $strContent ) > $intMaxSize ) | 480 | if( strlen( $strContent ) > $intMaxSize ) |
474 | { | 481 | { |
475 | $strShortContent = substr( $strContent , 0 , $intMaxSize - strlen( "..." ) ) . "..."; | 482 | $strShortContent = substr( $strContent , 0 , $intMaxSize - strlen( "..." ) ) . "..."; |
476 | } | ||
477 | else | ||
478 | { | ||
479 | $strShortContent = $strContent; | ||
480 | } | 483 | } |
481 | $arrReplace[ "<codetodiagram:message_text/>" ] = $strShortContent; | 484 | else |
482 | $arrReplace[ "codetodiagram:message_values" ] = $strContent; | 485 | { |
486 | $strShortContent = $strContent; | ||
487 | } | ||
488 | $arrReplace[ "<codetodiagram:message_text/>" ] = $strShortContent; | ||
489 | $arrReplace[ "codetodiagram:message_values" ] = $strContent; | ||
483 | $strResult .= $this->getTemplate( "line_note.html" , $arrReplace ); | 490 | $strResult .= $this->getTemplate( "line_note.html" , $arrReplace ); |
484 | } | 491 | } |
485 | elseif( $objActor->getPosition() > $intPosition ) | 492 | elseif( $objActor->getPosition() > $intPosition ) |
... | ... | ||
805 | return ( $strText ); | 812 | return ( $strText ); |
806 | } | 813 | } |
807 | } | 814 | } |
808 | ?> | 815 | ?> |
Download diff