我们想用fabric.js创建一个电子白板项目,
项目快完成了,但还是有点问题,
在我们的pdf讲义上写了大约200次后它会滞后,
有没有人有相关经验?
// we doubted that the problem comes from here
this.canvas.add(pathObj)
const state = this.canvas.toJSON(['eventInfo'])
const action = {
type: 'draw',
data: null
}
this.state = this.getState(state, action)
this.saveHistory(this.state)