Changeset 428 for trunk/web


Ignore:
Timestamp:
07/08/07 19:08:05 (17 years ago)
Author:
bastiaans
Message:

web/addons/job_monarch/libtoga.php:

  • fixed: big ClusterImage? width can also be smaller than maxwidth
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/libtoga.php

    r426 r428  
    13331333
    13341334                        $image_width    = $x_offset + ($node_width * ($x_max-$x_min+2));
    1335                         if( $this->isBig() )
    1336                         {
    1337                                 $image_width    = ($image_width < $this->width) ? $image_width : $this->width;
    1338                         }
    1339                         else if( $this->isSmall() )
    1340                         {
    1341                                 $image_width    = $this->width;
    1342                         }
     1335
     1336                        if( $this->isSmall() )
     1337                        {
     1338                                $image_width    = $max_width;
     1339                        } else if( $this->isBig() )
     1340                        {
     1341                                $image_width    = ($image_width < $max_width) ? $image_width : $max_width;
     1342                        }
     1343                        //else if( $this->isSmall() )
     1344                        //{
     1345                        //      $image_width    = $this->width;
     1346                        //}
    13431347                        $image_height   = $y_offset + ($node_width * ($y_max-$y_min+2));
    13441348
     
    14731477                else
    14741478                {
    1475                         $image          = imageCreateTrueColor( $max_width, ($y_offset + (($node_rows*$node_width)+1) ) );
     1479                        if( $this->isSmall() ) {
     1480                                $image          = imageCreateTrueColor( $max_width, ($y_offset + (($node_rows*$node_width)+1) ) );
     1481                        } else if( $this->isBig() ) {
     1482                                $image_width    = ($node_width * $nodes_nr) + 2;
     1483                                $image_width    = ($image_width < $max_width) ? $image_width : $max_width;
     1484                                $image          = imageCreateTrueColor( $image_width, ($y_offset + (($node_rows*$node_width)+1) ) );
     1485                        }
    14761486                        $colorwhite     = imageColorAllocate( $image, 255, 255, 255 );
    14771487
Note: See TracChangeset for help on using the changeset viewer.