Closed xjh093 closed 2 years ago
I modified this file:
file:miniprogram_npm/hanzi-writer-miniprogram/index.js method:var RenderTarget = function () { // xxxxx }
function RenderTarget(view) { _classCallCheck(this, RenderTarget); this.view = view; this.eventEmitter = new _EventEmitter2.default(); //this.ctx = polyfillCanvasCtx(wx.createCanvasContext('writer-canvas', view)); //this.canvas = this.view.selectComponent('#writer-canvas'); const query = wx.createSelectorQuery().in(view); query.select('#writer-canvas') .fields({ node: true, size: true }) .exec((res) => { console.log("res1"); console.log(res); console.log("res2"); this.canvas = res[0].node; //this.ctx = polyfillCanvasCtx(this.canvas.getContext('2d')); this.ctx = this.canvas.getContext('2d'); }); }
but, there is a problem its display:
base lib: 2.21.0
Resolved, waiting for author merge pr 53
I modified this file:
file:miniprogram_npm/hanzi-writer-miniprogram/index.js method:var RenderTarget = function () { // xxxxx }
but, there is a problem its display: