【发布时间】:2014-05-22 10:39:40
【问题描述】:
我正在实现在 Shift+Alt+Click 上创建两个节点之间的链接的功能。像这样
function graphSelectionChange(event){
var selection = event.selection;
if (selection.length === 2 && event.altKey){
var fromitem=selection[0];
var toitem=selection[1];
chart.addData({
links:[{
"id":"ll"+nextId,
from:fromitem.id,
to:toitem.id,
"style":{"label":"newLink"}
}]
});
nextId += 1;
}
}
似乎没有检测到 altKey。根据http://jsfiddle.net/Rw4km/,它是键盘上的 alt/option 按钮。有什么线索吗?
【问题讨论】:
标签: macos alt-key zoomcharts