Show
Ignore:
Timestamp:
03/07/08 08:33:04 (4 years ago)
Author:
nperriault
Message:

Clever Svg:

  • refs #40: more elements tests
  • Removed depth management, as svg handle it natively

Warning: breaks BC from 0.5.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cleversvg/trunk/base/csBaseElement.class.php

    r335 r336  
    7676              } 
    7777            } 
    78             $element_node->setAttribute('style', implode('; ', $styles)); 
     78            if (count($styles) > 0) 
     79            { 
     80              $element_node->setAttribute('style', implode('; ', $styles)); 
     81            } 
    7982          break; 
    8083          default: 
     
    260263    if (!is_null($value)) 
    261264    { 
    262       $this->attributes[$name] = $value; 
     265      $this->attributes[strtolower($name)] = $value; 
    263266    } 
    264267  } 
     
    271274  public function setDepth($depth) 
    272275  { 
    273     if (!is_null($depth) && is_int($depth)) 
     276    if (is_null($depth)) 
     277    { 
     278      unset($this->attributes['style']['z-index']); 
     279    } 
     280    elseif (is_int($depth)) 
    274281    { 
    275282      $this->attributes['style']['z-index'] = (string) $depth;