mirror of
https://github.com/tenrok/vue-context.git
synced 2026-06-24 01:20:33 +03:00
Update code style
This commit is contained in:
+4
-12
@@ -288,19 +288,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
positionMenu(top, left, element) {
|
positionMenu(top, left, element) {
|
||||||
const largestHeight =
|
const elementHeight = this.useScrollHeight ? element.scrollHeight : element.offsetHeight;
|
||||||
window.innerHeight -
|
const largestHeight = window.innerHeight - elementHeight - this.heightOffset;
|
||||||
(this.$props.useScrollHeight
|
|
||||||
? element.scrollHeight
|
|
||||||
: element.offsetHeight) -
|
|
||||||
this.$props.heightOffset;
|
|
||||||
|
|
||||||
const largestWidth =
|
const elementWidth = this.useScrollWidth ? element.scrollWidth : element.offsetWidth;
|
||||||
window.innerWidth -
|
const largestWidth = window.innerWidth - elementWidth - this.widthOffset;
|
||||||
(this.$props.useScrollWidth
|
|
||||||
? element.scrollWidth
|
|
||||||
: element.offsetWidth) -
|
|
||||||
this.$props.widthOffset;
|
|
||||||
|
|
||||||
if (top > largestHeight) {
|
if (top > largestHeight) {
|
||||||
top = largestHeight;
|
top = largestHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user