Use fullscreen modal on small screen. Issue #23

This commit is contained in:
Matias De lellis
2019-11-01 09:30:51 -03:00
parent 35ae3ce9ae
commit 44a8bb28fd
2 changed files with 11 additions and 4 deletions

View File

@@ -148,7 +148,7 @@
.modal-note-background {
position: fixed; /* Stay in place */
z-index: 200; /* Sit on top */
z-index: 1051; /* Sit on top */
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;

View File

@@ -267,11 +267,18 @@ View.prototype = {
note.css({"opacity": "0.1"});
var windowWidth = $(window).width();
var modalWidth = note.width()*2;
var modalTop = 150;
if (windowWidth < modalWidth) {
modalWidth = windowWidth;
modalTop = 50;
}
$(".modal-content").animate (
{
left: ($(window).width() / 2 - note.width()),
width: note.width()*2,
top: 150,
left: (windowWidth / 2 - modalWidth / 2),
width: modalWidth,
top: modalTop,
},
250,
function () {