Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
マウスダウンd3.event中にShiftキーが押されたかどうかを判断することは可能ですか?可能であれば、これを行う方法を教えてください。APIを調べてみてください。ただし、有用なものは見つかりませんでした。
次のようなものを使用できるはずです。
d3.select(window).on("click", function() { if (d3.event.shiftKey) { alert("Mouse+Shift pressed"); } });
デモ: http://jsfiddle.net/SO_AMK/NTGKG/1/
多分それを使用する必要があります:
if (d3.event.sourceEvent.shiftKey) { console.log("shift pressed"); }