📖 This is a static documentation page. Open the interactive version with live canvas demos →

Scenes

A scene is a bookmark for a canvas position — a saved combination of coordinates, zoom level, and viewport size. Scenes let you jump instantly between important areas of a large process without manual scrolling.

What a Scene Stores

Each scene records:

  • Name — a user-chosen label (e.g. "Assembly line start")
  • Position — the X/Y translation of the canvas at the moment of saving
  • Scale — the zoom level, rounded to two decimal places
  • Viewport — the browser window dimensions at save time
  • Address — the grid cell at the viewport centre (e.g. "A5"), computed automatically
  • Timestamp — when the scene was created or last updated
  • Description — an optional note explaining what the scene captures

Creating a Scene

Open the Scenes panel and click the add button, or use the quick-create shortcut. The system:

  • Reads the current canvas transform (position, scale)
  • Reads the viewport dimensions
  • Calculates the grid address of the centre point
  • Checks for duplicate scenes — if another scene already points to the same address at the same scale, a new scene is not created
  • Adds the scene to the top of the list

The panel shows scenes in a scrollable list. Each entry displays the name, the grid address, and action buttons for navigating, renaming, reordering, and deleting.


Click a scene in the panel to fly to that position. The canvas animates smoothly:

  • Duration — 800 ms by default
  • Easing — `easeOutExpo` — fast initial movement that decelerates toward the target
  • Interpolation — scale, X translation, and Y translation are each interpolated from current to target using the eased progress value
  • Frame loop — uses `requestAnimationFrame` for smooth rendering at the display's refresh rate

After the animation completes, the final position is recorded as a command so it appears in the undo/redo history.

If the animation duration is set to zero, the jump is instant.


Updating and Renaming

Update — select a scene and choose update. The scene's position, scale, and address are overwritten with the current canvas state. The name and description are preserved.

Rename — edit the scene's name in-place. Empty names are not allowed; the input is trimmed.


Reordering and Deleting

Scenes can be moved up or down in the list using the arrow buttons, or moved to a specific position by index. The order in the panel determines the visual order — nothing else depends on it.

Deleting a scene removes it permanently. If the deleted scene was the currently highlighted one, the highlight is cleared.


Scene Limit

The panel stores up to 50 scenes. If the limit is reached, the oldest scenes at the bottom of the list are removed when new ones are added.


Persistence

Scenes are stored in the browser's localStorage under the key `mpts_scenes`. The saved data includes the full scene list and the ID of the currently highlighted scene.

This means:

  • Scenes persist across page reloads
  • Scenes are local to the browser — they are not uploaded to the cloud with the process file
  • Clearing browser data removes all scenes

Import and Export

Scenes can be exported as a JSON string and imported into another session. On import:

  • The JSON is validated for correct structure
  • Scenes can either replace the existing list or merge with it
  • After import, the list is saved to localStorage immediately

This allows sharing scene sets between team members working on the same process layout.


Visual Indicators

The scenes panel uses two highlight colours:

  • Green — the scene you last navigated to (the actively selected scene)
  • Yellow — a scene whose grid address matches your current viewport centre, even if you scrolled there manually without clicking the scene

This dual-highlight system helps you see which bookmarked location you're near, regardless of how you got there.