【发布时间】:2017-08-17 09:58:37
【问题描述】:
我正在使用 SignaturePad。 (https://github.com/szimek/signature_pad)
根据 API,onBegin() 在笔画开始时被调用,但它似乎只在页面加载时被调用
例子:
var pad = new SignaturePad (canvas, {
backgroundColor: 'rgb(255,255,255)',
velocityFilterWeight:0.4,
onBegin: console.log('hello')
//onBegin: startWritingTimer()
});
上面的代码在页面加载时记录'hello',而不是在每个笔划的开始。我是否误解了 API?
【问题讨论】: