Skip to main content
createModelRenderer makes the on-screen 2D plan view. The user can pan, zoom and edit the plan in it.

Import

Example

Notes

  • The renderer needs a browser.
  • setNavigation sets how the wheel and the mouse buttons move the view. The sheet view from createSheetRenderer has the same method and the same settings.
  • The default is TRACKPAD_NAVIGATION: a two-finger scroll pans, and a pinch zooms. Ctrl or Cmd with the wheel also zooms.
  • With MOUSE_NAVIGATION the wheel zooms at the pointer.
  • panButtons lists the mouse buttons that pan by a drag. PanButton.Left pans only from empty space. The other buttons pan from any place.
  • In version 1.0.0 the wheel always zoomed. Call setNavigation(MOUSE_NAVIGATION) to keep that.
  • Two fingers on a touch screen do not pan or zoom.

Signature

Parameters

This function takes no arguments.

Returns

wheelNavigation

Resolve one wheel event to a pan in screen pixels or a zoom factor.

TRACKPAD_NAVIGATION

Two-finger scroll pans, pinch or Ctrl/Cmd with the wheel zooms.

MOUSE_NAVIGATION

The wheel zooms about the cursor; left and middle drag pan.

Types

WheelInput

The wheel event fields navigation reads.
How pointer input navigates the 2D plan editor and the sheet editor.
WheelAction
required
What an unmodified wheel or two-finger scroll does.
readonly PanButton[]
required
Buttons that pan by dragging. PanButton.Left pans from empty space only; the other buttons pan from anywhere.
number
required
Multiplier on zoom speed. Must be a finite number above zero.

WheelNavigation type

The result of wheelNavigation: a pan in pixels or a zoom factor.

WheelAction

What an unmodified wheel or two-finger scroll does in a 2D view.

PanButton

A mouse button that pans by dragging.
The navigation a wheel event resolves to.
Last modified on October 7, 2026