2
0
mirror of https://github.com/tenrok/vue-context.git synced 2026-05-17 05:09:36 +03:00

Update code style

This commit is contained in:
Randall Wilk
2020-05-28 08:22:16 -05:00
parent e20e5ac690
commit b38f6a31e7
+4 -12
View File
@@ -288,19 +288,11 @@ export default {
},
positionMenu(top, left, element) {
const largestHeight =
window.innerHeight -
(this.$props.useScrollHeight
? element.scrollHeight
: element.offsetHeight) -
this.$props.heightOffset;
const elementHeight = this.useScrollHeight ? element.scrollHeight : element.offsetHeight;
const largestHeight = window.innerHeight - elementHeight - this.heightOffset;
const largestWidth =
window.innerWidth -
(this.$props.useScrollWidth
? element.scrollWidth
: element.offsetWidth) -
this.$props.widthOffset;
const elementWidth = this.useScrollWidth ? element.scrollWidth : element.offsetWidth;
const largestWidth = window.innerWidth - elementWidth - this.widthOffset;
if (top > largestHeight) {
top = largestHeight;