To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Changeset 4521

Show
Ignore:
Timestamp:
01/27/12 10:43:24 (4 months ago)
Author:
tboutell
Message:

Cleaner fix. maxHeight shouldn't just smash height, height is sometimes respected in its own right. It should just be a last minute alternative to height for setting the height of the outer div if height is not specified.

Location:
plugins/apostrophePlugin/branches/1.5
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/1.5/lib/action/BaseaSlideshowSlotComponents.class.php

    r4520 r4521  
    8181    $this->options['uncropped'] = $this->getOption('uncropped', false); 
    8282 
    83     // Crossfade doesn't work well without a height unless you do special gymnastics. The simple 
    84     // workaround is to specify maxHeight as a fallback 
    85     if (($this->options['transition'] === 'crossfade') && ($this->options['height'] === false) && ($this->options['maxHeight'] !== false)) 
    86     { 
    87       $this->options['height'] = $this->options['maxHeight']; 
    88     } 
    89  
    9083    // We automatically set up the aspect ratio if the resizeType is set to 'c' 
    9184    $constraints = $this->getOption('constraints', array()); 
  • plugins/apostrophePlugin/branches/1.5/modules/aSlideshowSlot/templates/_slideshow.php

    r4381 r4521  
    1212 
    1313<?php if (count($items)): ?> 
    14         <ul id="a-slideshow-<?php echo $id ?>" class="a-slideshow clearfix <?php echo (count($items === 1) ? 'single-image' : 'multi-image') ?> transition-<?php echo $options['transition'] ?>"<?php echo ($options['transition'] == 'crossfade')? ' style="height:'.$options['height'].'px; width:'.$options['width'].'px;"':'' ?>> 
     14  <?php // Crossfade doesn't work well without a height unless you do special gymnastics. The simple ?> 
     15  <?php // workaround is to specify maxHeight as a fallback ?> 
     16   
     17        <ul id="a-slideshow-<?php echo $id ?>" class="a-slideshow clearfix <?php echo (count($items === 1) ? 'single-image' : 'multi-image') ?> transition-<?php echo $options['transition'] ?>"<?php echo ($options['transition'] == 'crossfade')? ' style="height:'.($options['height'] ? $options['height'] : ($options['maxHeight'] ? $options['maxHeight'] : 0)) . 'px; width:'.$options['width'].'px;"':'' ?>> 
    1518        <?php $first = true; $n=0; foreach ($items as $item): ?> 
    1619          <?php $dimensions = aDimensions::constrain(