【发布时间】:2017-05-20 11:56:31
【问题描述】:
我正在尝试在 typescript 中为jointjs 论文添加事件处理程序,但没有找到使用joint js 定义文件实现它的方法。
private paper = new joint.dia.Paper({
el: $('#paper'),
width: 650,
height: 400,
gridSize: 20,
model: this.graph,
markAvailable: true,
linkConnectionPoint: joint.util.shapePerimeterConnectionPoint,
snapLinks: true
});
this.paper.on('mouseclick', () => {
console.log('Congratulations, you clicked the mouse!');
});
获取错误信息
TS1068:意外的令牌。需要构造函数、方法、访问器或属性。
如何使用 typescript 为 rect 和 lines 添加事件处理程序?
【问题讨论】:
标签: typescript jointjs