Skip to content
Snippets Groups Projects
Commit 734d8621 authored by Tilman Vatteroth's avatar Tilman Vatteroth :robot:
Browse files

Scrollbar akzeptiert jetzt auch einen transparenten Hintergrund

parent 627a20ac
Branches
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ this.loaded = function(panel, config) { ...@@ -6,7 +6,7 @@ this.loaded = function(panel, config) {
function CanvasMarquee() { function CanvasMarquee() {
var var
me = this, me = this,
bgColor = panel.css("background-color"), bgColor = null,//panel.css("background-color"),
fgColor = "yellow", fgColor = "yellow",
font = "vrr", font = "vrr",
baseline = 0.7, baseline = 0.7,
...@@ -58,9 +58,12 @@ this.loaded = function(panel, config) { ...@@ -58,9 +58,12 @@ this.loaded = function(panel, config) {
if (left > -texts[textID].width) { if (left > -texts[textID].width) {
left = left - (amount > 0 ? amount : 1); left = left - (amount > 0 ? amount : 1);
if (bgColor == null) {
mctx.fillStyle = bgColor; mctx.clearRect(0, 0, width, height);
mctx.fillRect(0, 0, width, height); } else {
mctx.fillStyle=bgColor;
mctx.fillRect(0, 0, width, height);
}
mctx.drawImage(texts[textID].text, left, 0); mctx.drawImage(texts[textID].text, left, 0);
window.requestAnimationFrame(render); window.requestAnimationFrame(render);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment