FIX карта в фотораме, фоторама на полном экране, навигация в фотораме
This commit is contained in:
parent
468135281f
commit
74209340f5
|
|
@ -451,8 +451,9 @@ $(document).ready(function(){
|
||||||
initFotorama('.dfotorama');
|
initFotorama('.dfotorama');
|
||||||
|
|
||||||
$(window).on("orientationchange", function (event) {
|
$(window).on("orientationchange", function (event) {
|
||||||
$('.dfotorama').data('fotorama').destroy();
|
// $('.dfotorama').data('fotorama').destroy();
|
||||||
initFotorama('.dfotorama');
|
// initFotorama('.dfotorama');
|
||||||
|
// myMap.invalidateSize();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -496,6 +497,14 @@ function initFotorama(selector, data){
|
||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
startindex: 0
|
startindex: 0
|
||||||
|
}).on('fotorama:fullscreenenter', function (e, fotorama) {
|
||||||
|
fotorama.setOptions({
|
||||||
|
nav: 'dots'
|
||||||
|
});
|
||||||
|
}).on('fotorama:fullscreenexit', function (e, fotorama) {
|
||||||
|
fotorama.setOptions({
|
||||||
|
nav: 'thumbs'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,13 +44,13 @@ $index = 0;
|
||||||
<?php if ($photos || $point->img): ?>
|
<?php if ($photos || $point->img): ?>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<div class="dfotorama" data-loop="true" data-allowfullscreen="true" data-nav="thumbs" data-thumbwidth="100" data-keyboard="true">
|
<div class="dfotorama" data-loop="true" data-allowfullscreen="native" data-nav="thumbs" data-thumbwidth="100" data-keyboard="true">
|
||||||
<?php if ($point->img): ?>
|
<?php if ($point->img): ?>
|
||||||
<img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>">
|
<img data-thumb="<?= $point->img ?>" src="<?= $point->img ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($photos): ?>
|
<?php if ($photos): ?>
|
||||||
<?php foreach ($photos as $photo): ?>
|
<?php foreach ($photos as $photo): ?>
|
||||||
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/big/<?= $photo->name ?>" data-caption="<?= $photo->getOriginalLink()?>" alt="<?= $point->name ?> на wikipoints.ru">
|
<img data-thumb="/photos/small/<?= $photo->name ?>" src="/photos/middle/<?= $photo->name ?>" data-full="/photos/big/<?= $photo->name ?>" data-caption="<?= $photo->getOriginalLink()?>" alt="<?= $point->name ?> на wikipoints.ru">
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<span data-thumb="/img/mapThumb.png">
|
<span data-thumb="/img/mapThumb.png">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue