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.
setNavigationsets how the wheel and the mouse buttons move the view. The sheet view fromcreateSheetRendererhas 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_NAVIGATIONthe wheel zooms at the pointer. panButtonslists the mouse buttons that pan by a drag.PanButton.Leftpans 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.NavigationSettings
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.