mirror of
https://github.com/adriancooney/console.snapshot.git
synced 2025-12-08 21:26:19 +00:00
Removing console.image scale. It doesn't make any sense because you can't scale a background image (to my knowledge)
This commit is contained in:
parent
a934fc9edb
commit
3c43255d03
@ -31,12 +31,11 @@
|
||||
* @param {int} scale Scale factor on the image
|
||||
* @return {null}
|
||||
*/
|
||||
console.image = function(url, scale) {
|
||||
scale = scale || 1;
|
||||
console.image = function(url) {
|
||||
var img = new Image();
|
||||
|
||||
img.onload = function() {
|
||||
var dim = getBox(this.width * scale, this.height * scale);
|
||||
var dim = getBox(this.width, this.height);
|
||||
console.log("%c" + dim.string, dim.style + "background: url(" + url + "); color: transparent;");
|
||||
};
|
||||
|
||||
@ -49,7 +48,7 @@
|
||||
* @param {HTMLCanvasElement} canvas The canvas element
|
||||
* @return {null}
|
||||
*/
|
||||
console.snapshot = function(canvas) {
|
||||
console.snapshot = function(canvas, scale) {
|
||||
console.image(canvas.toDataURL());
|
||||
};
|
||||
})(console);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user