Skip to content

Instantly share code, notes, and snippets.

@gilf
Created May 20, 2020 08:22
import * as d3 from "d3";
export const createContextMenu = (d, menuItems, width, height, svgId) => {
menuFactory(d3.event.pageX - width / 2, d3.event.pageY - height / 1.5, menuItems, d, svgId);
d3.event.preventDefault();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment