Minor UX Improvements

This commit is contained in:
cyraki 2022-01-18 19:13:48 -05:00
parent 3354c83b22
commit f245489f2f
2 changed files with 3 additions and 4 deletions

View file

@ -2,8 +2,7 @@
<div tabindex="0" <div tabindex="0"
class="cd-mediaitem-square" :class="getClasses()" @contextmenu="contextMenu" class="cd-mediaitem-square" :class="getClasses()" @contextmenu="contextMenu"
v-observe-visibility="{callback: visibilityChanged}" v-observe-visibility="{callback: visibilityChanged}"
:style="{'--spcolor': getBgColor()}" :style="{'--spcolor': getBgColor()}">
@click.self='app.routeView(item)'>
<template v-if="isVisible"> <template v-if="isVisible">
<div class="artwork-container"> <div class="artwork-container">
<div class="artwork" @click='app.routeView(item)'> <div class="artwork" @click='app.routeView(item)'>

View file

@ -72,10 +72,10 @@
style["top"] = this.event.clientY + "px"; style["top"] = this.event.clientY + "px";
// make sure the menu panel isnt off the screen // make sure the menu panel isnt off the screen
if (this.event.clientX + this.size[0] > window.innerWidth) { if (this.event.clientX + this.size[0] > window.innerWidth) {
style["left"] = (window.innerWidth - this.size[0]) + "px"; style["left"] = (this.event.clientX - this.size[0]) + "px";
} }
if (this.event.clientY + this.size[1] > window.innerHeight) { if (this.event.clientY + this.size[1] > window.innerHeight) {
style["top"] = (window.innerHeight - this.size[1]) + "px"; style["top"] = (this.event.clientY - this.size[1]) + "px";
} }
} }
return style return style