Update PCT Trace

This commit is contained in:
2022-01-24 11:34:43 +01:00
parent 469db34534
commit 84acb22492
2 changed files with 61881 additions and 2673 deletions

64543
geo/pct.gpx

File diff suppressed because it is too large Load Diff

View File

@@ -291,7 +291,7 @@
}); });
//Manage Repositioning Event //Manage Repositioning Event
this.$nav.on('mousedown', (e)=>{ this.$nav.on('mousedown', (e) => {
if(this.$image.css('--scale') > 1) { if(this.$image.css('--scale') > 1) {
//The following block gets the X/Y offset (the difference between where it starts and where it was clicked) //The following block gets the X/Y offset (the difference between where it starts and where it was clicked)
this.gMouseDownOffsetX = e.clientX - parseFloat(this.$image.css('--translate-x') || 0); this.gMouseDownOffsetX = e.clientX - parseFloat(this.$image.css('--translate-x') || 0);
@@ -304,20 +304,17 @@
} }
}); });
$window.on('mouseup', ()=>{ $window.on('mouseup', () => {
$window.off('mousemove', divMove); $window.off('mousemove', divMove);
this.$container.removeClass('moving'); this.$container.removeClass('moving');
}); });
function divMove(e){ function divMove(e){
//var oImage = self.album[self.currentImageIndex];
let iZoom = self.$image.css('--scale'); let iZoom = self.$image.css('--scale');
let fTransX = e.clientX - self.gMouseDownOffsetX; let fTransX = e.clientX - self.gMouseDownOffsetX;
let fTransY = e.clientY - self.gMouseDownOffsetY; let fTransY = e.clientY - self.gMouseDownOffsetY;
let fTransMaxX = (iZoom - 1) * self.$image.width() / 2;
var fTransMaxX = (iZoom - 1) * self.$image.width() / 2; let fTransMaxY = (iZoom - 1) * self.$image.height() / 2;
var fTransMaxY = (iZoom - 1) * self.$image.height() / 2;
fTransX = Math.max(Math.min(fTransX, fTransMaxX), fTransMaxX * -1); fTransX = Math.max(Math.min(fTransX, fTransMaxX), fTransMaxX * -1);
fTransY = Math.max(Math.min(fTransY, fTransMaxY), fTransMaxY * -1); fTransY = Math.max(Math.min(fTransY, fTransMaxY), fTransMaxY * -1);