renders original image when displaying deepzoom images
This commit is contained in:
parent
01a30c9ace
commit
1fb0d8c91d
|
@ -75,13 +75,18 @@ class ImageViewer extends AbstractBlockLayout
|
|||
static $id = 0;
|
||||
|
||||
$media = $attachments[0]->item()->media()[0];
|
||||
if ($block->dataValue('zoom_type') == "wheelzoom") {
|
||||
$image_url = $media->originalUrl();
|
||||
} else {
|
||||
$image_url = $media->primaryMedia()->thumbnailUrl('large');
|
||||
}
|
||||
return $view->partial('common/block-layout/imageViewer', [
|
||||
'zoom_type' => $block->dataValue('zoom_type'),
|
||||
'title' => $block->dataValue('title'),
|
||||
'item_url' => $attachments[0]->item()->url(),
|
||||
'renderSourceLink' => $block->dataValue('renderSourceLink'),
|
||||
'width' => $block->dataValue('width'),
|
||||
'image' => $media->primaryMedia()->thumbnailUrl('large'),
|
||||
'image' => $image_url,
|
||||
'id' => 'iv-' . ++$id,
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue