diff options
| author | stonedDiscord <Tukz@gmx.de> | 2021-10-09 13:44:29 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2021-10-09 13:44:29 +0200 |
| commit | d1be0aff406a4026154b2d4ce40f9c73d5146821 (patch) | |
| tree | 65826aa746f172c9c879507ee510344369edcaf9 | |
| parent | 86754335392e752b092cb729cc09cc637ff05f68 (diff) | |
display horizontal offset again
| -rw-r--r-- | webAO/client.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/webAO/client.js b/webAO/client.js index 4dd89b8..da98094 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -2131,8 +2131,20 @@ async changeBackground(position) { } // Shift by the horizontal offset - //pairLayers.style.left = Number(this.chatmsg.other_offset[0]) + "%"; - //charLayers.style.left = Number(this.chatmsg.self_offset[0]) + "%"; + switch(this.chatmsg.side) { + case "wit": + pairLayers.style.left = (200+Number(this.chatmsg.other_offset[0])) + "%"; + charLayers.style.left = (200+Number(this.chatmsg.self_offset[0])) + "%"; + break; + case "pro": + pairLayers.style.left = (400+Number(this.chatmsg.other_offset[0])) + "%"; + charLayers.style.left = (400+Number(this.chatmsg.self_offset[0])) + "%"; + break; + default: + pairLayers.style.left = Number(this.chatmsg.other_offset[0]) + "%"; + charLayers.style.left = Number(this.chatmsg.self_offset[0]) + "%"; + break; + } // New vertical offsets pairLayers.style.top = Number(this.chatmsg.other_offset[1]) + "%"; |
