From 734d86214cb5f9ad5bb81eb9af9213b7cfdb28c5 Mon Sep 17 00:00:00 2001
From: mrdrogdrog <tilman.vatteroth@udo.edu>
Date: Wed, 8 Jul 2015 12:09:50 +0200
Subject: [PATCH] Scrollbar akzeptiert jetzt auch einen transparenten
 Hintergrund

---
 panels/scrollbar/script.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/panels/scrollbar/script.js b/panels/scrollbar/script.js
index 59a2fe3..7bde495 100755
--- a/panels/scrollbar/script.js
+++ b/panels/scrollbar/script.js
@@ -6,7 +6,7 @@ this.loaded = function(panel, config) {
 	function CanvasMarquee() {
 		var
 			me = this,
-			bgColor		= panel.css("background-color"),
+			bgColor		= null,//panel.css("background-color"),
 			fgColor		= "yellow",
 			font		= "vrr",
 			baseline	= 0.7,
@@ -58,9 +58,12 @@ this.loaded = function(panel, config) {
 			if (left > -texts[textID].width) {
 
 				left = left - (amount > 0 ? amount : 1);
-
-				mctx.fillStyle = bgColor;
-				mctx.fillRect(0, 0, width, height);
+				if (bgColor == null) {
+					mctx.clearRect(0, 0, width, height);
+				} else {
+					mctx.fillStyle=bgColor;
+					mctx.fillRect(0, 0, width, height);
+				}
 				mctx.drawImage(texts[textID].text, left, 0);
 				window.requestAnimationFrame(render);
 			} else {
-- 
GitLab