Skip to content

Glossary

David Benson edited this page Oct 7, 2026 · 1 revision

The vocabulary you meet in the draw.io code, in alphabetical order, with the class or file where each concept lives. Each term has its own heading, so other pages can link to it (for example [cell state](Glossary#cell-state)). For how the pieces fit together, see Architecture; for the model in depth, see Graph model.

A

Action

A named command, such as undo, copy or exportPdf, stored in ui.actions (Actions in js/grapheditor/Actions.js). Actions.prototype.addAction(key, funct, enabled, iconCls, shortcut) creates an Action; menus, toolbars and keyboard bindings refer to actions by key. See Extending the editor.

Adaptive colours

Colours that follow the dark mode of the viewer. The editor writes them as CSS light-dark() values, and graph.adaptiveColors (auto, simple or none, saved as the adaptiveColors attribute of the diagram) controls how colours are adapted (Graph.prototype.setAdaptiveColors, Graph.addLightDarkColors).

Autosave

Saving shortly after each change. editor.autosave is the user's switch (the autosave action); DrawioFile.prototype.isAutosave decides per file, and DrawioFile.prototype.autosave schedules the save autosaveDelay ms after the last change.

B

Bundle

A concatenated, minified file of many sources, such as js/app.min.js, js/extensions.min.js or js/viewer.min.js. The bundles are built by etc/build/build.xml and committed. See Building.

C

Canvas

The drawing interface shapes paint on: mxAbstractCanvas2D with the implementations mxSvgCanvas2D (SVG in the editor and SVG export) and mxXmlCanvas2D. Shapes do not create DOM nodes themselves; they call canvas methods such as rect, begin, lineTo and fillAndStroke.

Cell

A node of the diagram: an mxCell (mxgraph/src/model/mxCell.js) with an id, a value (the label or a user object), a geometry, a style string, a parent and children. A cell is a vertex, an edge, or neither (the root and the layers). A cell with the locked=1 style, or inside a locked ancestor, cannot be moved or edited (isCellLocked, the lockUnlock action). See Graph model.

Cell renderer

mxCellRenderer (graph.cellRenderer) creates and updates the shapes and labels of cell states. mxCellRenderer.registerShape(name, constructor) adds a shape that styles can name with shape=....

Cell state

An mxCellState is the view's computed data for one visible cell: the resolved style, the bounds in screen coordinates, the absolute points of an edge, and the shape and text objects. Get it with graph.view.getState(cell). States are rebuilt from the model; never store data in them.

Chromeless

A view without menubar, sidebar, format panel and toolbar: new Editor(true, ...), chrome=0, the lightbox and the viewer. editor.chromeless and editor.isChromelessView() tell code which mode it is in.

Client

For a cloud backend, the class that talks to its API: DriveClient, OneDriveClient, GitHubClient, GitLabClient, DropboxClient, TrelloClient, all extending DrawioClient. Compare file. See Storage backends.

Codec

Converts objects to and from XML. mxCodec (mxgraph/src/io/mxCodec.js) encodes and decodes the model; mxCodecRegistry holds a codec per class, such as mxCellCodec and mxModelCodec.

Collapsed

A container cell whose children are hidden (mxCell.collapsed, written as collapsed="1"). graph.foldCells collapses and expands ("folding"); while collapsed, the cell uses mxGeometry.alternateBounds for its expanded size. Whether a cell can be collapsed is decided by graph.foldingEnabled and the collapsible style. Trees fold through the treeFolding style (js/diagramly/Trees.js).

Compressed XML

A page whose <diagram> element contains Base64 text instead of an <mxGraphModel> element: the XML is URI-encoded, deflated with pako and Base64-encoded (Graph.compress, Graph.decompress). New files are uncompressed; compressed="true" on <mxfile> turns compression on for a file. See File format.

Configuration

Settings chosen by the deployment rather than the user: a JSON object passed to Editor.configure from window.DRAWIO_CONFIG, the configure=1 embed handshake, or the configuration stored in localStorage under Editor.configurationKey. Self-hosted deployments set DRAWIO_CONFIG and other global variables in js/PreConfig.js, which loads before the app code (js/PostConfig.js loads after it). See Configuration.

Connection constraint

A fixed point on a shape where edges attach, an mxConnectionConstraint with a relative point and an optional offset. Shapes define them in the points style (for example points=[[0,0],[0.5,0],[1,0]]) or in code (shape.constraints, stencil.constraints); Graph.prototype.getAllConnectionConstraints collects them. Also called connection points.

Connection handler

mxConnectionHandler (graph.connectionHandler) creates edges by dragging from a shape, its hover icons or a connection point.

Container

A vertex that other cells can be dropped into, marked with the container=1 style (swimlanes are containers unless container=0). See Graph.prototype.isContainer.

D

Dark mode

Dark UI colours. Editor.darkMode, Editor.isDarkMode() and EditorUi.prototype.setDarkMode; the dark URL parameter takes 1, 0 or auto. Diagram colours follow it through adaptive colours.

Default parent

The cell that new cells are inserted into, by default the first layer: graph.getDefaultParent(). Selecting a layer in the Layers dialog changes it.

Dev mode

index.html?dev=1: bootstrap.js loads the source files one by one through js/diagramly/Devel.js instead of the bundles, so changes show after a reload. See Getting started and Debugging.

Diagram

In the file format, one <diagram> element of an <mxfile>, that is, one page. It contains an <mxGraphModel> element (or its compressed form) with the cells and graph attributes such as grid, page, pageWidth and math.

DiagramPage

The class for a page at runtime (js/diagramly/Pages.js). It wraps the <diagram> node and holds the page's root cell once loaded and its view state.

Draft

A copy of unsaved changes kept in the browser's IndexedDB so that they survive a crash or a closed tab (DrawioFile.prototype.saveDraft, App.prototype.checkDrafts, DraftDialog).

E

Edge

A cell that connects two cells (mxCell.edge is true, model.isEdge(cell)). Its geometry holds the waypoints and the label position; its ends are its terminals. Besides its own label, an edge can have extra labels: child vertices with a relative geometry.

Edge style

The routing function of an edge, chosen with the edgeStyle style (orthogonalEdgeStyle, elbowEdgeStyle, entityRelationEdgeStyle, isometricEdgeStyle, ...). The functions are in mxEdgeStyle and are registered by name in mxStyleRegistry.

Editor

The Editor class (js/grapheditor/Editor.js, extended in js/diagramly/Editor.js): owns the graph, the undoManager, the modified flag and the conversion between the graph and XML (setGraphXml, getGraphXml). Reach it with ui.editor.

EditorUi

The class that builds and runs the user interface (js/grapheditor/EditorUi.js, extended in js/diagramly/EditorUi.js). In the app, the instance is an App. Plugins receive it as ui.

Embed mode

embed=1: the editor runs in an iframe and is controlled by the parent window through postMessage (EditorUi.prototype.installMessageHandler). See Embedding.

Etag

The version tag of a stored file, read from the file's descriptor (the metadata the backend returns, file.getDescriptor()) with DrawioFile.prototype.getCurrentEtag. It detects that someone else saved the file in the meantime, which leads to conflict handling (handleConflictError).

Extensions

The code in js/extensions.min.js: importers (Lucidchart, VSDX, GraphML, Miro) and optional engines (ELK, Mermaid, libavoid). It is loaded before the editor UI in the app and on demand elsewhere.

F

File

For storage, a DrawioFile subclass (LocalFile, StorageFile, DriveFile, OneDriveFile, GitHubFile, GitLabFile, DropboxFile, TrelloFile, EmbedFile, ...) that holds the data of an open diagram and knows how to save it. ui.getCurrentFile() returns the open one.

Format panel

The panel on the right. With a selection it shows the Style, Text and Arrange tabs (StyleFormatPanel, TextFormatPanel, ArrangePanel); without one, the Diagram and Style tabs (DiagramFormatPanel, DiagramStylePanel). All are in js/grapheditor/Format.js.

Freehand

Drawing with the mouse or a pen (mxFreehand in js/diagramly/mxFreehand.js, the insertFreehand action, perfect-freehand for the stroke). The result is a vertex whose shape is an inline stencil(...) holding the drawn path.

G

Geometry

The position and size of a cell, an mxGeometry with x, y, width, height and, for edges, points, sourcePoint and targetPoint. Vertex coordinates are relative to the parent's origin. See relative geometry.

Graph

Graph (js/grapheditor/Graph.js) extends mxGraph, the core class of the library (mxgraph/src/view/mxGraph.js) that connects the model, the view, the stylesheet, the renderer and the handlers. Graph adds draw.io's behaviour: label sanitising, links, placeholders, tables, layouts, animations and SVG export. One instance per editor: ui.editor.graph.

Grid

The background grid that positions snap to (graph.gridSize, default 10; graph.gridEnabled; graph.snap(value)). Saved as the grid and gridSize attributes of the diagram.

Group

A vertex created by the group action around the selected cells, with the group style (graph.groupCells). Unlike a container, a group is not a drop target.

Guides

The alignment lines shown while moving cells (mxGuide, graph.graphHandler.guidesEnabled).

H

Handler

An object that turns mouse and keyboard events into graph operations. mxGraphHandler moves cells, mxVertexHandler resizes and rotates a selected vertex, mxEdgeHandler edits a selected edge, mxConnectionHandler creates edges, mxRubberband selects an area. Graph.js overrides many of them.

Hover icons

The blue arrows around a hovered vertex that clone and connect it (HoverIcons in js/grapheditor/Graph.js, ui.hoverIcons). Controlled by graph.connectionArrowsEnabled.

HTML label

A label with the html=1 style, rendered as HTML in an SVG foreignObject. It is stored raw and sanitised with Graph.sanitizeHtml each time it is rendered. Without html=1 the label is plain text.

L

Label

The text of a cell: the value string, or the label attribute of a user object. graph.getLabel(cell) returns it, graph.convertValueToString(cell) converts the value.

Layer

A child of the root cell. Every diagram has at least one layer (the cell with id="1"); cells are children of a layer or of other cells. model.isLayer(cell); the Layers dialog is LayersWindow.

Layout

An algorithm that positions cells: the mxGraph layouts (mxStackLayout, mxCompactTreeLayout, ...), ELK (ElkLayout) and others. EditorUi.prototype.executeLayout runs one as a single undoable edit. A layout container arranges its children automatically with the layout named in its childLayout style (stackLayout, tableLayout, treeLayout, flowLayout, ...); the layout manager runs it after every change (Graph.prototype.initLayoutManager, mxLayoutManager).

Library

A collection of shapes for the sidebar, stored as <mxlibrary> with a JSON array of entries. EditorUi.prototype.loadLibrary opens one; the *Library classes store them in the backends. See Shapes and stencils.

Lightbox

A read-only, full-window view of a diagram with a small toolbar, opened with lightbox=1 (an App in chromeless mode) or from the viewer (GraphViewer.prototype.showLightbox).

Link

A URL attached to a cell, stored in the link attribute of its user object (graph.getLinkForCell, graph.setLinkForCell). data:page/id,<pageId> links to a page. A custom link, data:action/json,{...}, runs actions on the diagram (show, hide, highlight and so on) instead of navigating (Graph.prototype.handleCustomLink in js/diagramly/Editor.js); see animation-actions-json.

M

Math

Typeset formulas in labels, enabled per diagram with math="1" (graph.mathEnabled). MathJax is loaded from math4/es5/ on the first typeset (Editor.initMath, Editor.loadMath).

Mode

The storage backend of a file or of the app: App.MODE_GOOGLE, App.MODE_ONEDRIVE, App.MODE_GITHUB, App.MODE_DEVICE, App.MODE_BROWSER, App.MODE_EMBED and others. The mode URL parameter preselects one; file.getMode() returns the mode of a file.

Model

The mxGraphModel (graph.model) that owns the cell tree. All changes go through it, inside beginUpdate()/endUpdate(), and it fires the CHANGE and UNDO events. See Graph model.

Model coordinates

The rendering mode in which cells are painted in model units and the zoom and scroll offset are one transform on the draw pane, so zooming and panning do not repaint (mxGraphView.prototype.modelCoordinates). On by default in the editor (Editor.fastRendering, the fastRendering configuration key) and always on in chromeless views.

Modified

Whether a diagram has unsaved changes: editor.modified and file.isModified(). Set by every model change unless the edit is flagged ignoreEdit.

mxfile

The root element of a draw.io file. It contains one <diagram> per page and file-level attributes such as compressed. ui.fileNode holds it at runtime. See File format.

O

Outline

The small overview window of the whole diagram (OutlineWindow with mxOutline).

P

Page

One diagram of a multi-page file. Only the current page's cells are in the model; ui.pages lists all pages as DiagramPage objects and ui.selectPage(page) switches between them. See Architecture.

Page view

Showing the page outlines and page breaks behind the diagram (graph.pageVisible, the pageView action, the page attribute, the pv URL parameter). The page size is graph.pageFormat.

Palette

A section of the shape sidebar, such as General or Flowchart (Sidebar.prototype.addPalette, sidebar.palettes). The palettes of draw.io are in js/diagramly/sidebar/.

Parent

The cell that contains a cell (mxCell.parent, model.getParent(cell)): the root for layers, a layer, a group or container, or an edge for edge labels.

Perimeter

The function that computes where an edge meets the outline of a shape, chosen with the perimeter style (ellipsePerimeter, rhombusPerimeter, ...). The functions are in mxPerimeter.

Placeholder

A %name% token in a label. If the cell's user object has placeholders="1", the token is replaced with the attribute of that name on the cell or on the nearest ancestor that has it, or with a global variable such as %date% or %time% (Graph.prototype.replacePlaceholders, getGlobalVariable). See predefined-placeholders.

Plugin

A script that extends the editor at runtime through Draw.loadPlugin(function(ui) { ... }). Built-in plugins are in plugins/ and are loaded with the p URL parameter; custom ones need ALLOW_CUSTOM_PLUGINS. See Plugins.

Port

A connectable child vertex with a relative geometry, used as a fixed connection place on its parent. The portConstraint style restricts the direction in which edges leave a terminal. Compare connection constraint.

R

Realtime

Collaborative editing of a file by several users at the same time (DrawioFileSync, started by DrawioFile.prototype.startSync). Changes are exchanged as patches, diffs between two versions of the pages (EditorUi.prototype.diffPages, patchPages in js/diagramly/DiffSync.js), which also merge remote changes after a save conflict.

Relative geometry

An mxGeometry with relative true. For a vertex, x and y are fractions of the parent's size (used for ports and labels on shapes); for an edge label, x is the position along the edge from -1 to 1 and y the distance from it. geometry.offset adds an absolute offset.

Root

The top cell of the model (model.getRoot(), id="0"). Its children are the layers. After drilling into a group, the view shows the children of the current root instead (graph.view.currentRoot, graph.enterGroup(), graph.exitGroup()).

Rubberband

Selecting the cells in a rectangle dragged on the background (mxRubberband, graph.getRubberband()).

S

Scratchpad

A personal library for frequently used shapes, kept in browser storage (EditorUi.prototype.loadScratchpad, the .scratchpad entry).

Selection model

The set of selected cells, an mxGraphSelectionModel (graph.getSelectionModel()). Use graph.getSelectionCells() and graph.setSelectionCells(cells); it fires CHANGE when the selection changes.

Settings

The user's preferences, such as language, theme, recent colours, libraries and plugins, kept in localStorage under .drawio-config by mxSettings (js/diagramly/Settings.js). Not to be confused with configuration.

Shape

The object that paints a cell, an mxShape subclass chosen with the shape style. Built-in shapes are in mxgraph/src/shape/, draw.io's in js/grapheditor/Shapes.js and shapes/; anything else is looked up as a stencil.

Shape picker

The menu of shapes that appears on a double-click on the background (EditorUi.prototype.installShapePicker, showShapePicker).

Sidebar

The shape panel on the left (Sidebar in js/grapheditor/Sidebar.js, ui.sidebar), made of palettes.

Sketch

The hand-drawn look of a shape, the sketch=1 style, painted through rough.js (Editor.createRoughCanvas). Sketch mode (Editor.sketchMode) makes new shapes sketched, and the sketch theme is a UI built around it.

Stencil

A shape described in XML (the stencil language) instead of JavaScript, an mxStencil registered in mxStencilRegistry under a name such as mxgraph.flowchart.database. The built-in stencil libraries ship in js/stencils.min.js; shape=stencil(...) embeds a compressed stencil in the style. See Shapes and stencils.

Style

The appearance of a cell, a string of key=value pairs separated by semicolons, optionally starting with names of styles in the stylesheet (for example text;html=1;fillColor=#dae8fc;). Read with graph.getCellStyle(cell), changed with graph.setCellStyles(key, value, cells). See Styles.

Stylesheet

The mxStylesheet (graph.getStylesheet()) with the default vertex and edge styles and the named styles. draw.io's default comes from styles/default.xml.

Swimlane

A container with a title bar, the swimlane shape (mxSwimlane); startSize is the size of the title and horizontal its orientation. Pools and lanes are swimlanes (graph.isSwimlane).

T

Table

A container with childLayout=tableLayout (shape table) whose children are rows (shape tableRow) whose children are cells (graph.isTable, isTableRow, isTableCell, createTable, TableShape).

Tags

Keywords stored in the tags attribute of a cell's user object, used to filter what is visible (TagsWindow, Graph.prototype.getTagsForCell).

Terminal

The cell at one end of an edge: the source (edge.source, model.getTerminal(edge, true)) or the target (edge.target, model.getTerminal(edge, false)). An end that is not connected is null and uses geometry.sourcePoint or geometry.targetPoint instead.

Theme

The UI variant, Editor.currentTheme, initialised from the global uiTheme (the ui URL parameter or the settings): kennedy, the classic UI built by the grapheditor layer and the fallback when a theme is not installed; min (js/diagramly/Minimal.js, EditorUi.initMinimalTheme), with the format panel in a window; and simple, sketch and atlas (js/diagramly/Simple.js). When no theme is set, App.main picks simple on small and touch screens on app.diagrams.net (App.isSimpleThemePreferred). Not to be confused with the diagram's stylesheet.

Transaction

A group of model changes between model.beginUpdate() and model.endUpdate(). It fires one CHANGE event and becomes one undoable edit.

U

Undo manager

mxUndoManager (ui.editor.undoManager) keeps the history of mxUndoableEdit objects, one per transaction. ui.undo() and ui.redo() use it.

urlParams

The global object with the parsed URL query parameters, filled by bootstrap.js (and from a #P hash). See supported-url-parameters.

User object

An XML element used as the value of a cell instead of a string, written as <UserObject> or <object> around the mxCell. Its attributes hold the label, the link, tags, the tooltip, placeholders and custom properties (Edit Data, EditDataDialog; graph.setAttributeForCell).

V

Vertex

A cell that is a node or shape of the diagram (mxCell.vertex is true, model.isVertex(cell)).

View

The mxGraphView (graph.view) that computes the cell states from the model and holds the zoom (scale) and the scroll offset (translate).

View state

The per-page settings that are not cells, such as grid, page format, background, zoom and scroll position (graph.getViewState(), graph.setViewState()); each page keeps its own.

Viewer

The read-only renderer for diagrams embedded in other web pages (GraphViewer in js/diagramly/GraphViewer.js, bundled as js/viewer.min.js and js/viewer-static.min.js). It turns every div.mxgraph with a data-mxgraph attribute into a diagram. See Embedding.

W

Waypoints

The intermediate points of an edge, stored in geometry.points as mxPoint objects (also called control points). The edge style computes the final route from them; the clearWaypoints action removes them.

See also

Clone this wiki locally