FIX отображение всплываек и фоток на маленьких экранах

This commit is contained in:
Krivchikov Dmitry 2015-11-18 23:53:45 +03:00
parent 20275fdc7a
commit 2c5aad4457
3 changed files with 24 additions and 4 deletions

View File

@ -112,6 +112,12 @@ img.imageInArticle {border: solid 3px white;}
/* ------------- ADAPTIVE --------------------*/
/* -------------------------------------------*/
@media screen and (min-width:1200px) and (min-height:1080px) {
#imageModal .modal-dialog {
width: 1180px!important;
}
}
/* Target landscape smartphones, portrait tablets, narrow desktops */
@media screen and (max-width:1000px) {
.modal-dialog {

View File

@ -461,6 +461,20 @@ function initFotorama(selector, data){
width = $(window).width() < 585 ? $(window).width()-10 : 555;
height = $(window).width() < 585 ? ((450/555)*($(window).width()-10)) : 450;
ww = $(window).width();
wh = $(window).height();
if (ww >= 1200 && wh >= 1080) {
width = 1110;
height = 900;
} else if (ww < 585) {
width = ww - 10;
height = ((450 / 555) * width);
} else {
width = 555;
height = 450;
}
if ($(window).height() < height) {
height = $(window).height();
width = (555 / 450) * height;

View File

@ -295,10 +295,10 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) {
}
description += '</div>';
maxWidth = $(window).width() < 500 ? $(window).width() : 500;
maxWidth = $(window).width() < 500 ? ($(window).width() - 48) : 500;
maxHeight = $(window).height() < 300 ? $(window).height() : 300;
marker.options.description = description;
marker.bindPopup(marker.options.description, {maxWidth: maxWidth, minWidth: 400, maxHeight: maxHeight});
marker.bindPopup(marker.options.description, {maxWidth: maxWidth, minWidth: maxWidth, maxHeight: maxHeight});
markers.zoomToShowLayer(marker, function () {
bounds = myMap.getBounds();