diff --git a/desktop/sources/scripts/ronin.js b/desktop/sources/scripts/ronin.js index ec6e9c4..b0b58cd 100644 --- a/desktop/sources/scripts/ronin.js +++ b/desktop/sources/scripts/ronin.js @@ -47,8 +47,8 @@ function Ronin () { this.theme.reset() } - this.log = function (msg) { - console.log(msg) + this.log = function (...msg) { + console.log(...msg) this.commander.setStatus(msg.reduce((acc, val) => { return acc + val + ' ' }, '')) } diff --git a/desktop/sources/scripts/surface.js b/desktop/sources/scripts/surface.js index 621ce02..8c1086d 100644 --- a/desktop/sources/scripts/surface.js +++ b/desktop/sources/scripts/surface.js @@ -111,7 +111,7 @@ function Surface (ronin) { const img = new Image() img.src = path img.onload = () => { - //ronin.log(`Open ${img.width}x${img.height}`) + ronin.log(`Open ${img.width}x${img.height}`) const rect = { x: 0, y: 0, w: img.width, h: img.height } this.resize(rect, true) this.context.drawImage(img, 0, 0, img.width, img.height) @@ -123,7 +123,7 @@ function Surface (ronin) { this.draw = function (img, rect = this.getFrame()) { return new Promise(resolve => { img.onload = () => { - //ronin.log(`Draw ${img.width}x${img.height}`) + ronin.log(`Draw ${img.width}x${img.height}`) this.context.drawImage(img, rect.x, rect.y, rect.w, rect.h) // no strect: img.height * (rect.w / img.width) resolve() } @@ -131,7 +131,7 @@ function Surface (ronin) { } this.crop = function (rect) { - // ronin.log(`Crop ${rect.w}x${rect.h} from ${rect.x}x${rect.y}`) + ronin.log(`Crop ${rect.w}x${rect.h} from ${rect.x}x${rect.y}`) const crop = this.getCrop(rect) this.resize(rect, true) this.context.drawImage(crop, 0, 0)