Handle RTL for avatar popup
This commit is contained in:
parent
99cca6ab53
commit
4af77e2480
1 changed files with 8 additions and 3 deletions
|
|
@ -514,19 +514,24 @@ export default {
|
||||||
//
|
//
|
||||||
const ref = this.selectedEvent && this.$refs[this.selectedEvent.getId()];
|
const ref = this.selectedEvent && this.$refs[this.selectedEvent.getId()];
|
||||||
var top = 0;
|
var top = 0;
|
||||||
var left = 0;
|
var left = "unset";
|
||||||
|
var right = "unset";
|
||||||
if (ref && ref[0]) {
|
if (ref && ref[0]) {
|
||||||
if (this.showAvatarMenuAnchor) {
|
if (this.showAvatarMenuAnchor) {
|
||||||
var rectAnchor = this.showAvatarMenuAnchor.getBoundingClientRect();
|
var rectAnchor = this.showAvatarMenuAnchor.getBoundingClientRect();
|
||||||
var rectChat = this.$refs.avatarOperationsStrut.getBoundingClientRect();
|
var rectChat = this.$refs.avatarOperationsStrut.getBoundingClientRect();
|
||||||
top = rectAnchor.top - rectChat.top;
|
top = rectAnchor.top - rectChat.top;
|
||||||
left = rectAnchor.left - rectChat.left;
|
if (this.$vuetify.rtl) {
|
||||||
|
right = (rectAnchor.right - rectChat.right)+ "px";
|
||||||
|
} else {
|
||||||
|
left = (rectAnchor.left - rectChat.left) + "px";
|
||||||
|
}
|
||||||
// if (left + 250 > rectChat.right) {
|
// if (left + 250 > rectChat.right) {
|
||||||
// left = rectChat.right - 250; // Pretty ugly, but we want to make sure it does not escape the screen, and we don't have the exakt width of it (yet)!
|
// left = rectChat.right - 250; // Pretty ugly, but we want to make sure it does not escape the screen, and we don't have the exakt width of it (yet)!
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return "top:" + top + "px;left:" + left + "px";
|
return "top:" + top + "px;left:" + left + ";right:" + right;
|
||||||
},
|
},
|
||||||
canRecordAudio() {
|
canRecordAudio() {
|
||||||
return util.browserCanRecordAudio();
|
return util.browserCanRecordAudio();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue