Compare commits

...

3 Commits

Author SHA1 Message Date
c8be679634 Add panel transition on mobile 2022-04-08 20:44:13 +02:00
30a7c56fe5 Bump leaflet to 1.8.0-beta3 2022-04-08 20:43:20 +02:00
df5ee60dd2 Fix lightbox resizing 2022-04-08 20:42:24 +02:00
7 changed files with 116 additions and 91 deletions

10
script/leaflet.min.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -337,6 +337,8 @@
, type: $link.attr('data-type')
, id: $link.attr('data-id')
, $Media: $link.attr('data-type')=='video'?self.$video:self.$image
, width: $link.find('img').attr('width')
, height: $link.find('img').attr('height')
//ADDED-END
});
}
@@ -506,15 +508,11 @@
// When image to show is preloaded, we send the width and height to sizeContainer()
var preloader = new Image();
preloader.onload = function(){
var $preloader;
self.$image.attr({
'alt': self.album[imageNumber].alt,
'src': filename
});
$preloader = $(preloader);
//Orientation management
if(Math.abs(self.album[imageNumber].orientation) == 90 && preloader.width > preloader.height) {
var sWidth = preloader.width;
@@ -557,15 +555,20 @@
}, 0);
*/
if(e) {
var oMedia = this.album[this.currentImageIndex];
if(oMedia.type == 'image') {
if(typeof oResizeTimer != 'undefined') clearTimeout(oResizeTimer);
oResizeTimer = setTimeout(()=>{this.changeImage(this.currentImageIndex);}, 200);
}
else {
//var $Media = oMedia.$Media;
//this.updateSize($($Media), $Media.videoWidth, $Media.videoHeight, oMedia.type);
}
if(typeof oResizeTimer != 'undefined') clearTimeout(oResizeTimer);
oResizeTimer = setTimeout(
() => {
switch(this.album[this.currentImageIndex].type) {
case 'image':
this.changeImage(this.currentImageIndex);
break;
case 'video':
this.updateSize(this.currentImageIndex);
break;
}
},
200
);
}
//ADDED-END
};
@@ -710,11 +713,11 @@
// Preload previous and next images in set.
Lightbox.prototype.preloadNeighboringImages = function() {
if (this.album.length > this.currentImageIndex + 1) {
if (this.album.length > this.currentImageIndex + 1 && this.album[this.currentImageIndex + 1].type == 'image') {
var preloadNext = new Image();
preloadNext.src = this.album[this.currentImageIndex + 1].link;
}
if (this.currentImageIndex > 0) {
if (this.currentImageIndex > 0 && this.album[this.currentImageIndex - 1].type == 'image') {
var preloadPrev = new Image();
preloadPrev.src = this.album[this.currentImageIndex - 1].link;
}

View File

@@ -231,5 +231,6 @@
@include lightbox-icon(cancel);
@extend .flicker;
color: #CCC;
text-decoration: none;
}
}

View File

@@ -7,47 +7,9 @@
}
#projects {
.leaflet-right, .leaflet-left {
transition: none;
}
&.with-feed, &.with-settings {
#submap {
width: 100%;
}
.leaflet-right {
right: calc(#{$panel-width});
}
.leaflet-left {
left: calc(#{$panel-width});
}
.leaflet-control-container .leaflet-top.leaflet-right {
display: none;
}
#title {
display: none;
}
}
&.with-feed #settings-button {
display:none;
}
&.with-settings #feed-button {
display:none;
}
.leaflet-control-container .leaflet-top.leaflet-left {
display: none;
}
#feed, #settings {
width: calc(#{$panel-width});
max-width: calc(#{$panel-width});
transition: none;
}
#feed {
@@ -60,8 +22,50 @@
#title {
width: calc(#{$panel-width} - #{$button-width} - 4 * #{$block-spacing});
max-width: calc(#{$panel-width} - #{$button-width} - 4 * #{$block-spacing});
text-align: center;
}
.leaflet-right, .leaflet-left {
width: 100%;
}
&.with-feed, &.with-settings {
#submap {
width: 100%;
}
.leaflet-control-container .leaflet-top.leaflet-right {
display: none;
}
#title {
width: calc(#{$panel-width} - #{$button-width} - 4 * #{$block-spacing});
max-width: calc(#{$panel-width} - #{$button-width} - 4 * #{$block-spacing});
}
}
&.with-feed {
.leaflet-right {
right: calc(#{$panel-width});
}
.leaflet-left {
left: calc((#{$panel-width}) * -1);
}
}
&.with-settings {
.leaflet-right {
right: calc((#{$panel-width}) * -1);
}
.leaflet-left {
left: calc(#{$panel-width});
}
}
.leaflet-control-container .leaflet-top.leaflet-left {
display: none;
}
}
.lightbox .lb-outerContainer .lb-container .lb-nav {

View File

@@ -45,7 +45,10 @@
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
@@ -53,6 +56,8 @@
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container.leaflet-touch-zoom {
@@ -166,9 +171,6 @@
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-tile {
will-change: opacity;
}
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
@@ -183,9 +185,10 @@
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
svg.leaflet-zoom-animated {
will-change: transform;
}
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
@@ -251,14 +254,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
.leaflet-container {
background: #ddd;
outline: 0;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
@@ -267,7 +267,10 @@ svg.leaflet-image-layer.leaflet-interactive path {
/* general typography */
.leaflet-container {
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
@@ -277,8 +280,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a,
.leaflet-bar a:hover {
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
@@ -295,7 +297,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover {
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
@@ -385,6 +388,8 @@ svg.leaflet-image-layer.leaflet-interactive path {
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
@@ -393,7 +398,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
}
/* Default icon URLs */
.leaflet-default-icon-path {
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
@@ -402,23 +407,24 @@ svg.leaflet-image-layer.leaflet-interactive path {
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.7);
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover {
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font-size: 11px;
.leaflet-control-attribution svg {
display: inline !important;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
@@ -431,7 +437,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
font-size: 11px;
white-space: nowrap;
overflow: hidden;
-moz-box-sizing: border-box;
@@ -475,16 +480,20 @@ svg.leaflet-image-layer.leaflet-interactive path {
}
.leaflet-popup-content {
margin: 13px 19px;
line-height: 1.4;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-popup-content p {
margin: 18px 0;
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
@@ -495,6 +504,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
@@ -517,13 +527,13 @@ svg.leaflet-image-layer.leaflet-interactive path {
width: 18px;
height: 14px;
font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
color: #757575;
text-decoration: none;
font-weight: bold;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
@@ -541,9 +551,6 @@ svg.leaflet-image-layer.leaflet-interactive path {
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-popup-tip-container {
margin-top: -1px;
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
@@ -578,7 +585,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-clickable {
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
@@ -638,3 +645,13 @@ svg.leaflet-image-layer.leaflet-interactive path {
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long