osx - detecting altKey on MacOS in zoomchart -


i'm implementing functionality create link between 2 nodes on shift+alt+click. this

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;     } }  

the altkey seems not detected. according http://jsfiddle.net/rw4km/ alt/option button on keyboard. clue?

use click event (it has selection attribute).

selection event not have altkey property.

there other selection changes, selected nodes disappearing, not have associated mouse clicks not want link added in such case.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -