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
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment