Trädgården
{
if (event.touches.length === 1) {
this.touchObject = event.touches[0];
}
}"
@touchend.passive="(event) => {
if (this.touchObject) {
let threshold = 10;
let touch = event.changedTouches[0];
let start = this.touchObject.clientX;
let end = touch.clientX;
let diff = Math.floor(start - end);
if (diff > threshold) {
nextImage();
}
if (diff < -threshold) {
previousImage();
}
}
}"
>
Huset
{
if (event.touches.length === 1) {
this.touchObject = event.touches[0];
}
}"
@touchend.passive="(event) => {
if (this.touchObject) {
let threshold = 10;
let touch = event.changedTouches[0];
let start = this.touchObject.clientX;
let end = touch.clientX;
let diff = Math.floor(start - end);
if (diff > threshold) {
nextImage();
}
if (diff < -threshold) {
previousImage();
}
}
}"
>
{
if (event.touches.length === 1) {
this.touchObject = event.touches[0];
}
}"
@touchend.passive="(event) => {
if (this.touchObject) {
let threshold = 10;
let touch = event.changedTouches[0];
let start = this.touchObject.clientX;
let end = touch.clientX;
let diff = Math.floor(start - end);
if (diff > threshold) {
nextImage();
}
if (diff < -threshold) {
previousImage();
}
}
}"
>