Docs/Graphical Modeling/Canvas & Component Browser

Canvas & Component Browser

Applies to: CoModel cloud modeling & simulation platform (v1.7+) Related articles: Component Drag-and-Drop & Connections, Parameters & Model Validation

1. Overview

The CoModel graphical editor uses a three-column, left-center-right layout: the Component Browser on the left, the modeling canvas in the middle, and the properties panel on the right. Mastering canvas navigation and the Component Browser is the first step toward building models efficiently.

Overall layout of the graphical modeling editor

2. Editor Layout

After opening any model, the main interface consists of the following areas:

Area Location Description
Top toolbar Top Model name, save status, view tabs, Undo/Redo, Export, Validate, compile info, Save, Version History, Share
Component Browser Left 15% Browse the MTK standard library, user component libraries, the Official Components library, and FMU/AI components; drag components onto the canvas
Modeling canvas Center 65% React Flow canvas for placing nodes, drawing connections, and box selection
Properties panel Right 20% Parameters and properties of the selected node/connection; model properties
Bottom status bar Bottom Node/connection counts, validation results

Tip: The top toolbar provides four tabs: Diagram, Code, Simulation, and Parameter Study. Simulation and Code are used for simulation configuration and Julia code editing respectively; see Code ↔ Diagram Two-Way Sync.

3. Component Browser

3.1 Component Sources

The Component Browser loads the following component sources and displays them in sections:

Source Contents Display
MTK standard library Electrical, mechanical, thermal, magnetic, Blocks, and other domain components from ModelingToolkitStandardLibrary Expanded as a two-level "module → submodule" tree
User component libraries Custom .jl component files you upload or write online Grouped hierarchically by "category → file → component"
Official Components Official components published by the platform (MTK / FMU / AI types, with type badges) Grouped hierarchically by "category → component"
FMU components FMU model files you upload Grouped hierarchically by "category → component"
AI components Components wrapping ONNX models you upload Grouped hierarchically by "category → component"

Sections and search in the Component Browser

3.2 Search and Navigation

  1. Enter a component name in the search box at the top of the browser (Chinese or English, partial keywords supported) and press Enter to filter the component list.
  2. Click a section or category heading to collapse or expand that group, which helps you locate components quickly in a large library.
  3. Component entries can be dragged directly onto the canvas to create nodes; see Component Drag-and-Drop & Connections.

3.3 Component Information

Hover over a component entry to view its description. After placing a component on the canvas, you can view and edit its ports, parameters, and initial conditions in the properties panel on the right; see Parameters & Model Validation.

4. Canvas Navigation

4.1 Zoom and Pan

Action Interaction Description
Zoom in / out Mouse wheel Zoom range 50% to 200%
Pan the canvas Hold the middle or right mouse button and drag; or hold Space + left button and drag Moves the viewport only, without changing node positions; no modifier keys required
Box selection Hold Shift + left button and drag Press and hold Shift before pressing the left button, then drag on empty canvas; see "Multi-Select"
Fit View The Fit View button on the toolbar at the bottom-left corner of the canvas Centers all content in view

Note: With no keys held, dragging with the left button on empty canvas neither pans nor box-selects. Panning and box selection are two independent gestures: middle / right button drag (or Space + left button drag) = pan; Shift + left button drag = box selection. Right-click does not open a context menu on empty canvas—it is used for panning only; the context menu works on nodes only.

When a model opens, the canvas automatically fits the view.

4.2 Alignment Guides

After selecting multiple nodes (by box selection or Ctrl + click, Cmd + click on macOS), an alignment toolbar floats at the top center of the canvas:

Alignment action Description
Align left / center horizontally / align right Aligns the selected nodes along the horizontal direction (at least 2 selected)
Align top / center vertically / align bottom Aligns the selected nodes along the vertical direction (at least 2 selected)
Distribute horizontally / distribute vertically Spaces the nodes evenly along the horizontal or vertical direction (at least 3 selected)

Canvas zoom and the multi-select alignment toolbar

4.3 Undo and Redo

Shortcut Action
Ctrl + Z Undo
Ctrl + Shift + Z or Ctrl + Y Redo

The undo stack keeps up to 100 operations. Tracked operations include adding/removing nodes, adding/removing connections, editing parameters / initial conditions / connection properties, and rotating/flipping nodes; moving nodes is not tracked.

4.4 Context Menu

Right-click a component node to open the context menu: Rotate 90°, Flip Horizontal, Flip Vertical, and Delete (if the component has connections, a prompt shows how many connections will be removed along with it).

Tip: To combine multiple components into a reusable module, build a graphical MTK component; see Creating MTK Components Graphically.

5. Multi-Select

Action Interaction
Box selection Hold Shift first, then press the left button and drag on empty canvas to draw a selection box
Add to selection Ctrl (Cmd on macOS) + click a node/connection
Clear selection Click empty canvas
Batch move Select multiple nodes, then drag any one of them
Batch delete Select, then press Delete

6. Canvas Export

After finishing a model, you can export the canvas as an image:

  1. Click the Export button on the top toolbar.
  2. Choose a format: PNG (2× high resolution) or SVG (vector).
  3. The export covers the full canvas (all nodes plus a margin). The file is named after the model and downloaded to your local machine.

7. Keyboard Shortcuts

Shortcut Action
Ctrl + S Save the model
Ctrl + Z / Ctrl + Shift + Z Undo / redo
Ctrl + C / Ctrl + V Copy / paste selected nodes
Ctrl + D Duplicate in place
Delete Delete selection
R Rotate selected nodes 90° clockwise
Esc Cancel a click-to-connect operation started from a port; when a selected node/connection has focus, press Esc to deselect
Space + left button drag Pan the canvas (middle / right button drag also works; see "Canvas Navigation")

Tip: Esc only cancels the click-to-connect mode where you click the source port and then click the target port. A connection being dragged ends when the mouse is released—it completes on a valid port or cancels automatically on empty canvas, and cannot be interrupted with Esc.

8. FAQ

My uploaded components are missing from the Component Browser?

Check that the library file's parse status is Parsed. Check the file status on the Component Library Tour page; if parsing failed, expand the file row to see the specific error message.

Canvas content is clipped or scrollbars appear?

Click the Fit View button on the toolbar at the bottom-left corner of the canvas, or check whether a node was accidentally dragged far away. You can also box-select all nodes and move them back to the center of the canvas.

Node positions are not restored after undo?

In the current version, moving nodes is not recorded in the undo stack (it only tracks adding/removing nodes and connections, parameter edits, rotate/flip, and similar operations). To restore a layout, drag the nodes back into place, or use Model Management to revert to an earlier version.