summaryrefslogtreecommitdiff
path: root/src/client/app
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-09 14:10:23 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-09 14:10:23 +0900
commitae6293cb6bf3815ba4e7d85a00eb91affd006cec (patch)
treed28dd0ec9bc8e7ffd484708dea7ddaafd7bd71a1 /src/client/app
parent:art: (diff)
downloadsharkey-ae6293cb6bf3815ba4e7d85a00eb91affd006cec.tar.gz
sharkey-ae6293cb6bf3815ba4e7d85a00eb91affd006cec.tar.bz2
sharkey-ae6293cb6bf3815ba4e7d85a00eb91affd006cec.zip
[Client] Improve usability
Diffstat (limited to 'src/client/app')
-rw-r--r--src/client/app/desktop/views/components/media-image.vue21
-rw-r--r--src/client/app/mobile/views/components/media-image.vue3
2 files changed, 4 insertions, 20 deletions
diff --git a/src/client/app/desktop/views/components/media-image.vue b/src/client/app/desktop/views/components/media-image.vue
index e4594dc217..446e500939 100644
--- a/src/client/app/desktop/views/components/media-image.vue
+++ b/src/client/app/desktop/views/components/media-image.vue
@@ -7,8 +7,6 @@
</div>
<a class="lcjomzwbohoelkxsnuqjiaccdbdfiazy" v-else
:href="image.url"
- @mousemove="onMousemove"
- @mouseleave="onMouseleave"
@click.prevent="onClick"
:style="style"
:title="image.name"
@@ -45,20 +43,6 @@ export default Vue.extend({
}
},
methods: {
- onMousemove(e) {
- const rect = this.$el.getBoundingClientRect();
- const mouseX = e.clientX - rect.left;
- const mouseY = e.clientY - rect.top;
- const xp = mouseX / this.$el.offsetWidth * 100;
- const yp = mouseY / this.$el.offsetHeight * 100;
- this.$el.style.backgroundPosition = `${xp}% ${yp}%`;
- this.$el.style.backgroundImage = `url("${this.image.url}")`;
- },
-
- onMouseleave() {
- this.$el.style.backgroundPosition = '';
- },
-
onClick() {
this.$root.new(ImageViewer, {
image: this.image
@@ -76,9 +60,8 @@ export default Vue.extend({
width 100%
height 100%
background-position center
-
- &:not(:hover)
- background-size cover
+ background-size contain
+ background-repeat no-repeat
.ldwbgwstjsdgcjruamauqdrffetqudry
display flex
diff --git a/src/client/app/mobile/views/components/media-image.vue b/src/client/app/mobile/views/components/media-image.vue
index 4d46516767..dbb275b511 100644
--- a/src/client/app/mobile/views/components/media-image.vue
+++ b/src/client/app/mobile/views/components/media-image.vue
@@ -62,7 +62,8 @@ export default Vue.extend({
width 100%
height 100%
background-position center
- background-size cover
+ background-size contain
+ background-repeat no-repeat
.qjewsnkgzzxlxtzncydssfbgjibiehcy
display flex