protected $_config = null;
protected $_content = '';
protected $_url;
+ protected $_externalIframe = false;
public $zindex = 2;
public function getHTMLContent() {
$this->copyExternalFile($d['dir'] . '/' . $this->alternative);
}
if (substr($this->alternative, 0, 4) == 'http') {
- $this->_url = $externalIframe = $this->alternative;
- $this->_config = array('html' => false, 'width' => $this->width * $this->getCssScale(), 'height' => $this->height * $this->getCssScale());
+ $this->_url = $this->_externalIframe = $this->alternative;
+ $this->_config = array('html' => false, 'width' => $this->width, 'height' => $this->height);
}
- $w = $this->width * $this->getCssScale();
- $h = $this->height * $this->getCssScale();
$res = '';
if ($this->_config['html']) {
$this->_url = $d['fdir'] . '/' . $this->_config['html'];
$res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_url . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
}
- if (isset($externalIframe)) {
+ if (isset($this->_externalIframe)) {
$iw = $this->_config['width'];
$ih = $this->_config['height'];
- $res = '<iframe data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
+ $res = '<iframe data-scale="' . $this->getCssScale() . '" data-width="' . $iw . '" data-height="' . $ih . '" width="' . $iw . '" height="' . $ih . '" src="' . $this->_externalIframe . '" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
}
foreach ($this->_config['inject'] as $i) {
$css .= $this->getCSSZIndex();
$css .= $this->getCSS();
$css .= '}';
+ if ($this->_externalIframe) {
+ $css .= '#l_' . $this->id . '>iframe{' . wsHTML5::writeCSSUA('transform', 'scale(' . $this->getCssScale() . ')') . '}';
+ }
return $css;
}