From 10250ee60b5f9014bfd68ea51f134ef17d3dadd5 Mon Sep 17 00:00:00 2001 From: Shimon Doodkin Date: Thu, 17 May 2018 10:35:06 +0300 Subject: [PATCH 1/3] fix repeating image --- console.snapshot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.snapshot.js b/console.snapshot.js index cf141ff..8be338e 100644 --- a/console.snapshot.js +++ b/console.snapshot.js @@ -217,7 +217,7 @@ scale = scale || 1, dim = getBox(width * scale, height * scale); - console.log("%c" + dim.string, dim.style + "background-image: url(" + url + "); background-size: " + (width * scale) + "px " + (height * scale) + "px; color: transparent;"); + console.log("%c" + dim.string, dim.style + "background-image: url(" + url + "); background-size: " + (width * scale) + "px " + (height * scale) + "px; color: transparent;background-repeat: no-repeat!important"); }; /** From b69ad6edd5baf9121840b1a102fcf90e5c9d55d1 Mon Sep 17 00:00:00 2001 From: Shimon Doodkin Date: Thu, 17 May 2018 10:41:27 +0300 Subject: [PATCH 2/3] fix no repeat of image too --- console.snapshot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.snapshot.js b/console.snapshot.js index 8be338e..623d454 100644 --- a/console.snapshot.js +++ b/console.snapshot.js @@ -197,7 +197,7 @@ img.onload = function() { var dim = getBox(this.width * scale, this.height * scale); - console.log("%c" + dim.string, dim.style + "background-image: url(" + url + "); background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent;"); + console.log("%c" + dim.string, dim.style + "background-image: url(" + url + "); background-size: " + (this.width * scale) + "px " + (this.height * scale) + "px; color: transparent;background-repeat: no-repeat!important"); if(callback) callback(); }; From 89c3edfdfe76139fe038eecd46dd9d5083bc374b Mon Sep 17 00:00:00 2001 From: Shimon Doodkin Date: Thu, 17 May 2018 10:50:41 +0300 Subject: [PATCH 3/3] fix bounding box size --- console.snapshot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/console.snapshot.js b/console.snapshot.js index 623d454..4eabc11 100644 --- a/console.snapshot.js +++ b/console.snapshot.js @@ -20,8 +20,8 @@ */ function getBox(width, height) { return { - string: "+", - style: "font-size: 1px; padding: " + Math.floor(height/2) + "px " + Math.floor(width/2) + "px; line-height: " + height + "px;" + string: "", + style: "font-size: 1px; padding-left: "+width+"px; padding-bottom: "+height+"px;" } }