diff options
Diffstat (limited to 'js/record.concat.js')
| -rw-r--r-- | js/record.concat.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/js/record.concat.js b/js/record.concat.js index 6cf6dba..12af95d 100644 --- a/js/record.concat.js +++ b/js/record.concat.js @@ -888,7 +888,7 @@ function GifEncoder(){ } ;var UI_TEMPLATE = [ - '<div id="curtain" style="opacity:0;width:100%;height:100%;margin:0;padding:0;position:absolute;top:0;left:0;background:rgba(255,255,255,0.1);"></div>', + '<div id="curtain" style="opacity:0;width:100%;height:100%;margin:0;padding:0;position:absolute;top:0;left:0;background:rgba(255,255,255,0.1);cursor:crosshair;"></div>', '<div id="outline" style="border:1px solid white;background:rgba(0,255,255,0.5);opacity:0.5; position: absolute;pointer-events:none"></div>', '<div id="controls" style="position: absolute;top:50px;right:50px;background:rgba(0,0,0,0.8);color:#fff;font-size:14px;min-width:300px; padding: 4px;cursor:default;">', 'frames <input type="text" id="framecount" value="30" style="width:30px;">', @@ -1056,10 +1056,20 @@ function GifEncoder(){ frames[i].width = w } } + function backgroundColor(){ + var colors = [ + source.style.backgroundColor, + document.body.backgroundColor, + "white" + ] + for (var i in colors) { + if (colors[i] != "") return colors[i] + } + } function capture(){ var frame = frames[done++] var ctx = frame.getContext('2d') - ctx.fillStyle = document.body.backgroundColor + ctx.fillStyle = backgroundColor() ctx.fillRect(0,0,w,h) ctx.drawImage(source, x, y, w, h, 0, 0, w, h) } |
