Skip to content

phylocanvas/phylocanvas-plugin-context-menu

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
dev
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

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, 
  }
})