:zap: [Enhance] Remove right offset for screenshot button
Browse files
components/buttons_binder.js
CHANGED
@@ -207,20 +207,15 @@ class ScreenshotButtonBinder {
|
|
207 |
button.attr("title", "Take screenshot for whole chat");
|
208 |
button.click(() => {
|
209 |
let screenshot_padding = 20;
|
|
|
|
|
210 |
let container_padding = 12;
|
211 |
-
let right_offset = 0;
|
212 |
-
if (window.innerWidth < 768) {
|
213 |
-
right_offset = 48;
|
214 |
-
}
|
215 |
html2canvas($("#messagers-container")[0], {
|
216 |
x: -(container_padding + screenshot_padding),
|
217 |
width:
|
218 |
$("#messagers-container").width() +
|
219 |
container_padding * 2 +
|
220 |
-
screenshot_padding * 2
|
221 |
-
right_offset,
|
222 |
-
// default padding is 0.75em (12px)
|
223 |
-
// p-1 (4px)(0.25em); p-2 (8px)(0.5em); p-3 (16px)(1em);
|
224 |
}).then((canvas) => {
|
225 |
var link = document.createElement("a");
|
226 |
let date = new Date();
|
|
|
207 |
button.attr("title", "Take screenshot for whole chat");
|
208 |
button.click(() => {
|
209 |
let screenshot_padding = 20;
|
210 |
+
// default padding is 0.75em (12px)
|
211 |
+
// p-1 (4px)(0.25em); p-2 (8px)(0.5em); p-3 (16px)(1em);
|
212 |
let container_padding = 12;
|
|
|
|
|
|
|
|
|
213 |
html2canvas($("#messagers-container")[0], {
|
214 |
x: -(container_padding + screenshot_padding),
|
215 |
width:
|
216 |
$("#messagers-container").width() +
|
217 |
container_padding * 2 +
|
218 |
+
screenshot_padding * 2,
|
|
|
|
|
|
|
219 |
}).then((canvas) => {
|
220 |
var link = document.createElement("a");
|
221 |
let date = new Date();
|