From be73cec42318d9232d0caaeff9003c89b9024820 Mon Sep 17 00:00:00 2001 From: CPPAlien Date: Tue, 7 Aug 2018 14:29:16 +0800 Subject: [PATCH] change to scaleToFill --- lib/pen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pen.js b/lib/pen.js index fcda199..5463df7 100644 --- a/lib/pen.js +++ b/lib/pen.js @@ -233,7 +233,7 @@ export default class Painter { if (view.sHeight > rHeight) { startY = Math.round((view.sHeight - rHeight) / 2); } - if (view.css.mode === 'aspectFit') { + if (view.css.mode === 'scaleToFill') { this.ctx.drawImage(view.url, -(width / 2), -(height / 2), width, height); } else { this.ctx.drawImage(view.url, startX, startY, rWidth, rHeight, -(width / 2), -(height / 2), width, height);