From 2c5aad4457a5196c25e6ad17a38483e9fd966bf1 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Wed, 18 Nov 2015 23:53:45 +0300 Subject: [PATCH] =?UTF-8?q?FIX=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=D1=81=D0=BF=D0=BB=D1=8B?= =?UTF-8?q?=D0=B2=D0=B0=D0=B5=D0=BA=20=D0=B8=20=D1=84=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=BD=D0=B0=20=D0=BC=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C?= =?UTF-8?q?=D0=BA=D0=B8=D1=85=20=D1=8D=D0=BA=D1=80=D0=B0=D0=BD=D0=B0=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 6 ++++++ public/js/app.js | 18 ++++++++++++++++-- public/js/map.js | 4 ++-- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index d0b6d57..6b07214 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -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 { diff --git a/public/js/app.js b/public/js/app.js index 08ad76a..568a13d 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -461,9 +461,23 @@ function initFotorama(selector, data){ width = $(window).width() < 585 ? $(window).width()-10 : 555; height = $(window).width() < 585 ? ((450/555)*($(window).width()-10)) : 450; - if($(window).height() < height ) { + 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; + width = (555 / 450) * height; } width = Math.round(width); diff --git a/public/js/map.js b/public/js/map.js index 0d81e2d..8fec5f6 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -295,10 +295,10 @@ function drawInfoPopup(id, showPopup, doNotPushToHistory) { } description += ''; - 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();