g6/packages/site/examples/tool/contextMenu/index.en.md
2023-02-02 10:31:36 +08:00

446 B

title order
ContextMenu 1

Using contextMenu in G6.

Usage

The demo below show how to use contextMenu on a graph. Menu's style can be defined by the CSS:

/* Define the CSS with the id of your menu */
  #contextMenu {
    position: absolute;
    /* ... Other styles */
  }
  #contextMenu li {
    cursor: pointer;
		/* ... Other styles */
  }
  #contextMenu li:hover {
    color: #aaa;
    /* ... Other styles */
  }
`);