From d1be0aff406a4026154b2d4ce40f9c73d5146821 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sat, 9 Oct 2021 13:44:29 +0200 Subject: display horizontal offset again --- webAO/client.js | 16 ++++++++++++++-- 1 file 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]) + "%"; -- cgit