we shall always pass width & height as pixels without units.
This commit is contained in:
parent
b20d61e0df
commit
c934295bf9
|
@ -227,7 +227,7 @@ function getImageStreamHTML( $id, $src, $width, $height, $title='' ) {
|
|||
if ( canStreamIframe() ) {
|
||||
return '<iframe id="'.$id.'" src="'.$src.'" alt="'. validHtmlStr($title) .'" '.($width? ' width="'. validInt($width).'"' : '').($height?' height="'.validInt($height).'"' : '' ).'/>';
|
||||
} else {
|
||||
return '<img id="'.$id.'" src="'.$src.'" alt="'. validHtmlStr($title) .'" style="'.($width? ' width:'.$width.';' : '' ).($height ? ' height:'. $height.';' : '' ).'"/>';
|
||||
return '<img id="'.$id.'" src="'.$src.'" alt="'. validHtmlStr($title) .'" style="'.($width? ' width:'.$width.'px;' : '' ).($height ? ' height:'. $height.'px;' : '' ).'"/>';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2137,15 +2137,15 @@ function getStreamHTML( $monitor, $options = array() ) {
|
|||
|
||||
if ( isset($options['scale']) and $options['scale'] and ( $options['scale'] != 100 ) ) {
|
||||
//Warning("Scale to " . $options['scale'] );
|
||||
$options['width'] = reScale( $monitor->Width(), $options['scale'] ) . 'px';
|
||||
$options['height'] = reScale( $monitor->Height(), $options['scale'] ) . 'px';
|
||||
$options['width'] = reScale( $monitor->Width(), $options['scale'] );
|
||||
$options['height'] = reScale( $monitor->Height(), $options['scale'] );
|
||||
} else {
|
||||
# scale is empty or 100
|
||||
# There may be a fixed width applied though, in which case we need to leave the height empty
|
||||
if ( ! ( isset($options['width']) and $options['width'] ) ) {
|
||||
$options['width'] = $monitor->Width() . 'px';
|
||||
$options['width'] = $monitor->Width();
|
||||
if ( ! ( isset($options['height']) and $options['height'] ) ) {
|
||||
$options['height'] = $monitor->Height() . 'px';
|
||||
$options['height'] = $monitor->Height();
|
||||
}
|
||||
} else if ( ! isset($options['height']) ) {
|
||||
$options['height'] = '';
|
||||
|
|
|
@ -202,7 +202,7 @@ foreach ( $monitors as $monitor ) {
|
|||
onclick="createPopup('?view=watch&mid=<?php echo $monitor->Id() ?>', 'zmWatch<?php echo $monitor->Id() ?>', 'watch', <?php echo reScale( $monitor->Width(), $monitor->PopupScale() ); ?>, <?php echo reScale( $monitor->Height(), $monitor->PopupScale() ); ?> );">
|
||||
<?php
|
||||
$monitor_options = $options;
|
||||
if ( $Positions ) {
|
||||
if (0 and $Positions ) {
|
||||
$monitor_options['width'] = '100%';
|
||||
$monitor_options['height'] = '100%';
|
||||
if ( 0 ) {
|
||||
|
|
Loading…
Reference in New Issue