Skip to content

textmode.js / Textmodifier / inputGrid

Method: inputGrid()

ts
inputGrid(target?): void | TextmodeGrid | "topmost";

Get or set the grid used for mouse and touch coordinate mapping.

By default, input coordinates are mapped to the topmost visible layer's grid, which changes dynamically as layers are shown/hidden. Use this method to lock input mapping to a specific grid, or to return to responsive mode.

When called without arguments, returns the current input grid mode:

  • 'topmost' if using responsive mode (default)
  • The specific TextmodeGrid if locked

Parameters

ParameterType
target?TextmodeGrid | "topmost"

Returns

void | TextmodeGrid | "topmost"

Example