我想在外面有外部按钮,可以在图表上执行一些操作。
App.MainView = joint.mvc.View.extend({
events: {
'click #multiplyBtn': 'testCell'
},
testCell: function() {
console.log('hi');
console.log(this.selection);
},
我试过像这样将它包含到 main.js 中,但它不起作用。
我也尝试设置 jquery 事件处理程序,但我不确定将代码放在哪里,因为我总是得到未定义的选择值