From b38f6a31e758c76538892b10469a9f22350b7480 Mon Sep 17 00:00:00 2001 From: Randall Wilk Date: Thu, 28 May 2020 08:22:16 -0500 Subject: [PATCH] Update code style --- src/js/vue-context.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/js/vue-context.js b/src/js/vue-context.js index 7a01439..cb33906 100644 --- a/src/js/vue-context.js +++ b/src/js/vue-context.js @@ -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;