]> _ Git - cubeextranet.git/commitdiff
fix #1951 @0:50
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 19 Feb 2018 10:36:47 +0000 (10:36 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 19 Feb 2018 10:36:47 +0000 (10:36 +0000)
inc/ws/Util/html5/master/class.ws.html5.links.php

index b36c4aa74005d8f8e1e9c4c6d27898772d378ce2..77a8d4d81edb50f94c0f73beff78cd88e2814486 100644 (file)
@@ -21,6 +21,7 @@ class wsHTML5Link {
        public $video_width;
        public $video_service;
        public $inline;
+       public $in_popup = false;
        public $display_area;
        public $read_mode;
        public $infobulle;
@@ -368,6 +369,7 @@ class htmlMultimediaPopupLink extends htmlMultimediaPopupImage {
        public function getAdditionnalContent() {
                $i = $this->_init;
                $i['inline'] = true;
+               $i['in_popup'] = true;
                $i['width'] = $i['video_width'];
                $i['height'] = $i['video_height'];
 
@@ -874,9 +876,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 ($this->_externalIframe !== false) {
-                               $iw = $this->_config['width'];
-                               $ih = $this->_config['height'];
-                               $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>';
+                               $s = $this->in_popup ? 1 : $this->getCssScale();
+                               $iw = $this->_config['width'] * $s;
+                               $ih = $this->_config['height'] * $s;
+                               $res = '<iframe data-scale="' . $s . '" 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) {
@@ -932,7 +935,7 @@ class htmlMultimediaLink extends wsHTML5Link {
                $css .= $this->getCSSZIndex();
                $css .= $this->getCSS();
                $css .= '}';
-               if ($this->_externalIframe !== false) {
+               if ($this->_externalIframe !== false && $this->in_popup) {
                        $css .= '#l_' . $this->id . '>iframe{' . wsHTML5::writeCSSUA('transform', 'scale(' . $this->getCssScale() . ')') . '}';
                }
                return $css;