From: vincent@cubedesigners.com Date: Tue, 27 Jun 2017 15:18:33 +0000 (+0000) Subject: #1375 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9e8fbd3346536a54cf7bb742b1e48c960e777903;p=cubeextranet.git #1375 --- diff --git a/inc/ws/Util/packager/class.ws.packager.phonegap.php b/inc/ws/Util/packager/class.ws.packager.phonegap.php index a6e345184..70b85618c 100644 --- a/inc/ws/Util/packager/class.ws.packager.phonegap.php +++ b/inc/ws/Util/packager/class.ws.packager.phonegap.php @@ -51,11 +51,11 @@ class wsPackagerPhonegap extends wsPackager { protected function makeScreenshots() { $resolutions = array( - 'ipad' => array('width' => 1024, 'height' => 768, 'zoom' => 2), + //'ipad' => array('width' => 1024, 'height' => 768, 'zoom' => 2), 'ipad-pro' => array('width' => 1366, 'height' => 1024, 'zoom' => 2), - 'iphone3-5' => array('width' => 960, 'height' => 640, 'zoom' => 1), - 'iphone-4' => array('width' => 1136, 'height' => 640, 'zoom' => 1), - 'iphone-4-7' => array('width' => 1334, 'height' => 750, 'zoom' => 1), + //'iphone3-5' => array('width' => 960, 'height' => 640, 'zoom' => 1), + //'iphone-4' => array('width' => 1136, 'height' => 640, 'zoom' => 1), + //'iphone-4-7' => array('width' => 1334, 'height' => 750, 'zoom' => 1), 'iphone-5-5' => array('width' => 2208, 'height' => 1242, 'zoom' => 1) ); @@ -73,7 +73,11 @@ class wsPackagerPhonegap extends wsPackager { if (is_numeric($view)) { $url = '/page/' . $view; } else { - $url = '/' . $view; + if (strpos($view, 'http') === 0) { + $url = $view; + } else { + $url = '/' . $view; + } } $views[] = array('orientation' => $orientation, 'url' => $url); } @@ -92,6 +96,7 @@ class wsPackagerPhonegap extends wsPackager { } foreach ($views as $k => $view) { + $delay = 2; if ($view['orientation'] == 'L') { $screenWidth = $w; $screenHeight = $h; @@ -99,7 +104,12 @@ class wsPackagerPhonegap extends wsPackager { $screenWidth = $h; $screenHeight = $w; } - $url = $baseUrl . $view['url']; + if (strpos($view['url'], 'http') === 0) { + $url = $view['url']; + $delay = 5; + } else { + $url = $baseUrl . $view['url']; + } $out = $dir . '/' . $k . '.jpeg'; $cl = new CubeIT_CommandLine('xvfb-run'); @@ -109,9 +119,10 @@ class wsPackagerPhonegap extends wsPackager { $cl->setArg('min-height', $screenHeight); $cl->setArg('zoom-factor', $z); $cl->setArg('url', $url); - $cl->setArg('delay', '2000'); + $cl->setArg('delay', $delay * 1000); $cl->setArg('out', $out); $cl->execute(); + $cl->debug(); } } }