Skip to content

joshsadam/phylocanvas-plugin-context-menu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Phylocanvas Context Menu Plugin

Contextual functions for Phylocanvas

Usage

npm install phylocanvas phylocanvas-plugin-context-menu
import Phylocanvas from 'phylocanvas';
import contextMenuPlugin, {
  DEFAULT_MENU_ITEMS,
  DEFAULT_BRANCH_MENU_ITEMS,
  DEFAULT_FILENAMES,
} from 'phylocanvas-plugin-context-menu';

Phylocanvas.plugin(contextMenuPlugin);

Phylocanvas.createTree('id', {
  contextMenu: { // config defaults
    menuItems: DEFAULT_MENU_ITEMS,
    branchMenuItems: DEFAULT_BRANCH_MENU_ITEMS, 
    unstyled: false,
    className: '',
    parent: undefined, // supply parent element to fix z-index issues
    filenames: DEFAULT_FILENAMES, 
  }
})

About

Contextual functions for Phylocanvas

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.7%
  • CSS 12.5%
  • HTML 3.8%