Skip to content
Changelog

editor.zooms.set

Changes a zoom's times, scale or focus; it's no longer automatic.

JSON-RPC 2.0project.write

Parameters

  • zoomnumberrequiredIts number from 1.
  • start_msnumberWhere it starts.
  • end_msnumberWhere it ends.
  • scalenumber1 to 8.
  • followbooleanFollow the pointer.
  • xnumber0 to 1.
  • ynumber0 to 1.
  • canvasstringA canvas's id or name, shown first. Default: the canvas shown.

Result

  • (the zoom){ zoom: number, start_ms: number, end_ms: number, scale: number, focus: "pointer" | { x: number, y: number }, auto: boolean }The zoom.

Errors

Invalid params (-32602) without zoom, or for a value out of range. Not found (-32004) for no such zoom. A state error (-32005) when it would run into another zoom. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it.

Events

Subscribers to events get editor.changed.

From an AI agent

The MCP server's editor_zooms (action: set) reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "editor.zooms.set",
"params": {}
}

editor.zooms.add