Skip to content
This repository was archived by the owner on Oct 5, 2022. It is now read-only.

Commit b38f6a3

Browse files
committed
Update code style
1 parent e20e5ac commit b38f6a3

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/js/vue-context.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -288,19 +288,11 @@ export default {
288288
},
289289

290290
positionMenu(top, left, element) {
291-
const largestHeight =
292-
window.innerHeight -
293-
(this.$props.useScrollHeight
294-
? element.scrollHeight
295-
: element.offsetHeight) -
296-
this.$props.heightOffset;
297-
298-
const largestWidth =
299-
window.innerWidth -
300-
(this.$props.useScrollWidth
301-
? element.scrollWidth
302-
: element.offsetWidth) -
303-
this.$props.widthOffset;
291+
const elementHeight = this.useScrollHeight ? element.scrollHeight : element.offsetHeight;
292+
const largestHeight = window.innerHeight - elementHeight - this.heightOffset;
293+
294+
const elementWidth = this.useScrollWidth ? element.scrollWidth : element.offsetWidth;
295+
const largestWidth = window.innerWidth - elementWidth - this.widthOffset;
304296

305297
if (top > largestHeight) {
306298
top = largestHeight;

0 commit comments

Comments
 (0)