Skip to content

Commit 3587760

Browse files
committed
(fix) rename menu options variable
1 parent 97f87d7 commit 3587760

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/ChatWindow/Message.vue

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
v-click-outside="closeOptions"
170170
class="menu-options"
171171
:class="{ 'menu-left': message.sender_id !== currentUserId }"
172-
:style="{ top: `${menuOptionsHeight}px` }"
172+
:style="{ top: `${menuOptionsTop}px` }"
173173
>
174174
<div class="menu-list">
175175
<div
@@ -244,7 +244,7 @@ export default {
244244
imageHover: false,
245245
messageHover: false,
246246
optionsOpened: false,
247-
menuOptionsHeight: 0,
247+
menuOptionsTop: 0,
248248
messageReaction: '',
249249
newMessage: {},
250250
emojiOpened: false,
@@ -417,17 +417,17 @@ export default {
417417
)
418418
return
419419
420-
const menuOptionsHeight = this.$refs.menuOptions.getBoundingClientRect()
420+
const menuOptionsTop = this.$refs.menuOptions.getBoundingClientRect()
421421
.height
422422
423423
const actionIconTop = this.$refs.actionIcon.getBoundingClientRect().top
424424
const roomFooterTop = this.roomFooterRef.getBoundingClientRect().top
425425
426426
const optionsTopPosition =
427-
roomFooterTop - actionIconTop > menuOptionsHeight + 50
427+
roomFooterTop - actionIconTop > menuOptionsTop + 50
428428
429-
if (optionsTopPosition) this.menuOptionsHeight = 28
430-
else this.menuOptionsHeight = -menuOptionsHeight
429+
if (optionsTopPosition) this.menuOptionsTop = 30
430+
else this.menuOptionsTop = -menuOptionsTop
431431
}, 0)
432432
},
433433
closeOptions() {
@@ -820,5 +820,9 @@ export default {
820820
.options-container {
821821
right: 5px;
822822
}
823+
824+
.menu-left {
825+
right: -50px;
826+
}
823827
}
824828
</style>

0 commit comments

Comments
 (0)