]> _ Git - cubeextranet.git/commitdiff
#1942
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Feb 2018 10:31:13 +0000 (10:31 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Feb 2018 10:31:13 +0000 (10:31 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index fbb2b0c1d784f2746bd8630ae8add2b71dff392d..a3779beb8561b9465faa92c0b801519ecc2c6175 100644 (file)
@@ -831,6 +831,7 @@ class htmlMultimediaLink extends wsHTML5Link {
        protected $_config = null;
        protected $_content = '';
        protected $_url;
+       protected $_externalIframe = false;
        public $zindex = 2;
 
        public function getHTMLContent() {
@@ -856,12 +857,10 @@ class htmlMultimediaLink extends wsHTML5Link {
                                $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'];
@@ -874,10 +873,10 @@ class htmlMultimediaLink extends wsHTML5Link {
 
                                $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) {
@@ -933,6 +932,9 @@ class htmlMultimediaLink extends wsHTML5Link {
                $css .= $this->getCSSZIndex();
                $css .= $this->getCSS();
                $css .= '}';
+               if ($this->_externalIframe) {
+                       $css .= '#l_' . $this->id . '>iframe{' . wsHTML5::writeCSSUA('transform', 'scale(' . $this->getCssScale() . ')') . '}';
+               }
                return $css;
        }