hide context menu

This commit is contained in:
沐见南 2020-09-15 10:05:22 +08:00
parent fd7efcbf73
commit e89a166354

View File

@ -57,14 +57,14 @@ export class Visual implements IVisual {
this.container = options.element;
this.host=options.host;
this.selectionManager=this.host.createSelectionManager();
// d3.select(this.container).on("contextmenu", () => {
// const mouseEvent: MouseEvent = <MouseEvent>d3.event;
// this.selectionManager.showContextMenu({}, {
// x: mouseEvent.clientX,
// y: mouseEvent.clientY
// });
// mouseEvent.preventDefault();
// });
d3.select(this.container).on("contextmenu", () => {
const mouseEvent: MouseEvent = <MouseEvent>d3.event;
this.selectionManager.showContextMenu({}, {
x: mouseEvent.clientX,
y: mouseEvent.clientY
});
mouseEvent.preventDefault();
});
}
private initial() {
if (this.innerContainer) {