添加截图密度限制

This commit is contained in:
Harvey Zack committed 2018-12-05 16:03:44 +08:00
1 parent 0e4e3da5ee
commit 6d3e0b4567
4 files changed
+71 -39

No files matched your search

+2 -1
View File
@@ -66,9 +66,10 @@
thumbnail.on('canvas', function(canvas) {
console.log('Build canvas successfully');
console.log('Canvas size: ' + canvas.width + ' x ' + canvas.height);
console.log('Preview density: ' + thumbnail.density + ' p/s');
});
thumbnail.on('update', function(percentage, url) {
thumbnail.on('update', function(url, percentage) {
console.log('Processing: ' + Math.floor(percentage.toFixed(2) * 100) + '%');
$preview.style.backgroundImage = 'url(' + url + ')';
});