Forum Discussion
ysapiyev
8 years agoResponsive Resident
Multiple selection in custom visual
Hi everyone. I wanted to know, how to do multple selection using pressed CTRL button and mouse click, instead of mouse click. I set this.selectionManager.select(d.identity, true), and it select...
- 8 years ago
Hello ysapiyev,
You should use something like this (event documentation):
// event is a mouse event const isCtrlKeyPressed = event.ctrlKey; this.selectionManager.select(d.identity, isCtrlKeyPressed);
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
v-viig
8 years agoCommunity Champion
Hello ysapiyev,
You should use something like this (event documentation):
// event is a mouse event const isCtrlKeyPressed = event.ctrlKey; this.selectionManager.select(d.identity, isCtrlKeyPressed);
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
ysapiyev
8 years agoResponsive Resident
Hello v-viig,
So ,as I understood, it should look like this, right?
var event = <Event>d3.event; const isCtrlKeyPressed =event.ctrlKey; this.selectionManager.select(d.identity, isCtrlKeyPressed);
However, it shows me that there is no property ctrlKey in event. I googled, and it gives me similar solution as yours. What can be wrong?
Regards,
Yerkhan