ViewChannel
One environment type's view: what the surface drew, what the reader explored to, and the glide between.
@internote/canvas-sdkOn this page
import { ViewChannel } from '@internote/canvas-sdk';The surface calls record on every render; a toolbar handler calls glide or reset; the surface reads current for the window to draw and hasExplored for whether a reset button is live.
#Fields
canZoomReturns whether a zoom step that way would move the view — false at the environment's limit, or before anything was drawn.
booleancurrentReturns the reader's window if they have one, else the one last drawn, or
null before anything was drawn.V | nullglideEases from wherever the view is now to a target, over the channel's glide time.
voidhasExploredReturns whether the reader has moved the view off the authored one.
booleanrecordRecords the window this render drew. With
explored false it is also recorded as the authored frame, the target reset glides back to.voidresetGlides back to the authored or automatic frame and releases the view, so a later keyframe still moves it.
voidzoomByGlides one zoom step in or out from the current view, and does nothing at the environment's limit.
voidzoomsWhether the environment steps its zoom from the toolbar — whether it supplied
zoom.booleanDeclared in packages/canvas-sdk/src/view/index.ts:106.