From 6caffeb998be18f000d0c739f2a3cccf031d17ec Mon Sep 17 00:00:00 2001 From: CPPAlien Date: Tue, 19 Nov 2019 10:28:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=BA=9B=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pen.js | 1 - painter.js | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/pen.js b/lib/pen.js index 0cc725d..9de321e 100644 --- a/lib/pen.js +++ b/lib/pen.js @@ -456,7 +456,6 @@ export default class Painter { } else { this.ctx.fillText(text, x, y, measuredWith); } - const fontSize = view.css.fontSize.toPx(); if (view.css.textDecoration) { this.ctx.beginPath(); this.ctx.moveTo(...this.callbackInfo.textDecoration.moveTo); diff --git a/painter.js b/painter.js index 0a770b1..0d87bd7 100644 --- a/painter.js +++ b/painter.js @@ -279,7 +279,8 @@ Component({ if (isDelete) { this.triggerEvent('touchEnd', { view: this.currentPalette.views[deleteIndex], - index: deleteIndex + index: deleteIndex, + type: 'delete' }) this.doAction() } else if (this.findedIndex < 0) { @@ -461,6 +462,16 @@ Component({ height, views: [] }).paint() + new Pen(this.bottomContext, { + width, + height, + views: [] + }).paint() + new Pen(this.topContext, { + width, + height, + views: [] + }).paint() }); },