return default values for Width and Height

This commit is contained in:
Isaac Connor 2018-05-05 12:49:00 -04:00
parent d9b6f4bd85
commit 5772ff9161
1 changed files with 13 additions and 12 deletions

View File

@ -235,24 +235,25 @@ private $control_fields = array(
return( $streamSrc );
} // end function getStreamSrc
public function Width( $new = null ) {
public function Width($new = null) {
if ( $new )
$this->{'Width'} = $new;
if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) {
return $this->{'Height'};
}
return $this->{'Width'};
}
$field = ( $this->Orientation() == '90' or $this->Orientation() == '270' ) ? 'Height' : 'Width';
if ( array_key_exists($field, $this) )
return $this->{$field};
return $this->defaults{$field};
} // end function Width
public function Height( $new=null ) {
public function Height($new=null) {
if ( $new )
$this->{'Height'} = $new;
if ( $this->Orientation() == '90' or $this->Orientation() == '270' ) {
return $this->{'Width'};
}
return $this->{'Height'};
}
$field = ( $this->Orientation() == '90' or $this->Orientation() == '270' ) ? 'Width' : 'Height';
if ( array_key_exists($field, $this) )
return $this->{$field};
return $this->defaults{$field};
} // end function Height
public function set($data) {
foreach ($data as $k => $v) {