mirror of
https://github.com/ae-utbm/sith.git
synced 2026-08-26 07:09:16 +00:00
Move image click to frame and remove image selection
This commit is contained in:
@@ -48,6 +48,9 @@
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
object-fit: contain;
|
||||
// Prevent ugly selection when
|
||||
// clicking to change the image
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,13 +82,16 @@
|
||||
|
||||
<div class="container" id="pict">
|
||||
<div class="main">
|
||||
<div class="photo" :aria-busy="currentPicture.imageLoading">
|
||||
<div
|
||||
class="photo"
|
||||
:aria-busy="currentPicture.imageLoading"
|
||||
@click="currentPicture = (($event.offsetX > $event.target.getBoundingClientRect().width / 2) ? nextPicture : previousPicture) ?? currentPicture"
|
||||
>
|
||||
<img
|
||||
:src="currentPicture.compressedUrl"
|
||||
:alt="currentPicture.name"
|
||||
id="main-picture"
|
||||
x-ref="mainPicture"
|
||||
@click="currentPicture = (($event.offsetX > $el.offsetWidth / 2) ? nextPicture : previousPicture) ?? currentPicture"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user