1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

Additions

This commit is contained in:
2020-05-23 13:32:14 +02:00
parent 0d5b2a2bd8
commit 07b9dca471
8 changed files with 446 additions and 31 deletions

View File

@ -1,10 +1,5 @@
<template>
<div class="context">
<!-- <a
class="context-overlay c-hand"
@click="$emit('close')"
@contextmenu="$emit('close')"
/> -->
<div
v-click-outside="close"
class="context-container"
@ -28,15 +23,15 @@ export default {
},
computed: {
position () {
return {
top: this.contextEvent.clientY + 'px',
left: this.contextEvent.clientX + 'px'
return { // TODO: calc direction if near corners
top: this.contextEvent.clientY + 5 + 'px',
left: this.contextEvent.clientX + 5 + 'px'
};
}
},
methods: {
close () {
this.$emit('close');
this.$emit('closeContext');
}
}
};
@ -67,8 +62,6 @@ export default {
border-radius: 0.1rem;
display: flex;
flex-direction: column;
max-height: 75vh;
padding: 0.3rem;
width: 100%;
position: absolute;
pointer-events: initial;
@ -76,6 +69,12 @@ export default {
.context-element{
display: flex;
align-items: center;
padding: .1rem .3rem;
cursor: pointer;
&:hover{
background: $primary-color;
}
}
}