Toolbar for the editor. This modifies the state of the graph or inserts new cells upon mouse clicks.
Constructs a new toolbar for the given container and editor. The container and editor may be null if a prototypical instance for a {@link mxDefaultKeyHandlerCodec} is created.
DOM node that contains the toolbar.
Reference to the enclosing mxEditor.
Specifies if elements should be connected if new cells are dropped onto connectable elements.
Reference to the enclosing mxEditor.
Reference to the function used to reset the toolbar.
Defines the spacing between existing and new vertices in gridSize units when a new vertex is dropped on an existing cell. Default is 4 (40 pixels).
Holds the internal mxToolbar.
Helper method to invoke mxToolbar.addActionCombo on toolbar using the given title and return the resulting DOM node.
String that represents the title of the combo.
Binds the given action to a option with the specified label in the given combo. Combo is an object returned from an earlier call to addCombo or addActionCombo.
DOM node that represents the combo box.
String that represents the title of the combo.
Name of the action to execute in editor.
Helper method to invoke mxToolbar.addCombo on toolbar and return the resulting DOM node.
Adds a new item that executes the given action in editor. The title, icon and pressedIcon are used to display the toolbar item.
String that represents the title (tooltip) for the item.
URL of the icon to be used for displaying the item.
Name of the action to execute when the item is clicked.
Optional URL of the icon for the pressed state.
Creates an item for selecting the given mode in the editor's graph. Supported modenames are select, connect and pan.
String that represents the title of the item.
URL of the icon that represents the item.
String that represents the mode name to be used in mxEditor.setMode.
Optional URL of the icon that represents the pressed state.
Optional JavaScript function that takes the mxEditor as the first and only argument that is executed after the mode has been selected.
Helper method to invoke mxToolbar.addOption on toolbar and return the resulting DOM node that represents the option.
DOM node that represents the combo box.
String that represents the title of the combo.
Object that represents the value of the option.
Creates an item for inserting a clone of the specified prototype cell into the editor's graph. The ptype may either be a cell or a function that returns a cell.
String that represents the title of the item.
URL of the icon that represents the item.
Function or object that represents the prototype cell. If ptype is a function then it is invoked with no arguments to create new instances.
Optional URL of the icon that represents the pressed state.
Optional boolean that specifies if the item can be toggled. Default is true.
Adds a vertical separator using the optional icon.
Optional URL of the icon that represents the vertical separator. Default is {@link mxClient.imageBasePath} + ‘/separator.gif’.
Handles a drop from a toolbar item to the graph. The given vertex represents the new cell to be inserted. This invokes insert or connect depending on the given target cell.
Parameters:
mxCell to be inserted.
Mouse event that represents the drop.
Optional mxCell that represents the drop target.
Constructs the toolbar for the given container and installs a listener that updates the mxEditor.insertFunction on editor if an item is selected in the toolbar. This assumes that editor is not null.
Handles a drop by inserting the given vertex into the given parent cell or the default parent if no parent is specified.
mxCell to be inserted.
Mouse event that represents the drop.
Optional mxCell that represents the parent.
Makes the given img draggable using the given function for handling a drop event.
DOM node that represents the image.
Function that handles a drop of the image.
Generated using TypeDoc
Toolbar for the editor. This modifies the state of the graph or inserts new cells upon mouse clicks.
Create a toolbar with a button to copy the selection into the clipboard, and a combo box with one action to paste the selection from the clipboard into the graph.
This class uses the {@link mxDefaultToolbarCodec} to read configuration data into an existing instance. See {@link mxDefaultToolbarCodec} for a description of the configuration format.