暴露palette显示成功

This commit is contained in:
dongqing 2019-12-04 14:48:07 +08:00
parent a5e7c0040e
commit 36ce87fe20
2 changed files with 4 additions and 2 deletions

View File

@ -547,7 +547,7 @@ export default class Painter {
}
let lineIndex = 0;
for (let j = 0; j < textArray.length; ++j) {
const preLineLength = Math.floor(textArray[j].length / linesArray[j]);
const preLineLength = Math.ceil(textArray[j].length / linesArray[j]);
let start = 0;
let alreadyCount = 0;
for (let i = 0; i < linesArray[j]; ++i) {

View File

@ -630,7 +630,9 @@ Component({
this.bottomContext || (this.bottomContext = wx.createCanvasContext('bottom', this));
this.topContext || (this.topContext = wx.createCanvasContext('top', this));
this.globalContext || (this.globalContext = wx.createCanvasContext('k-canvas', this));
new Pen(this.bottomContext, palette).paint();
new Pen(this.bottomContext, palette).paint(() => {
this.triggerEvent('didShow');
});
new Pen(this.globalContext, {
width,
height,