BlockSuite API Documentation / @blocksuite/blocks / SurfaceViewport
Interface: SurfaceViewport ​
Contents ​
Properties ​
boundingClientRect ​
readonly
boundingClientRect:DOMRect
Source ​
packages/blocks/src/surface-block/renderer.ts:29
center ​
readonly
center:IPoint
Source ​
packages/blocks/src/surface-block/renderer.ts:20
centerX ​
readonly
centerX:number
Source ​
packages/blocks/src/surface-block/renderer.ts:21
centerY ​
readonly
centerY:number
Source ​
packages/blocks/src/surface-block/renderer.ts:22
height ​
readonly
height:number
Source ​
packages/blocks/src/surface-block/renderer.ts:19
left ​
readonly
left:number
Source ​
packages/blocks/src/surface-block/renderer.ts:16
top ​
readonly
top:number
Source ​
packages/blocks/src/surface-block/renderer.ts:17
viewportBounds ​
readonly
viewportBounds:Bound
Source ​
packages/blocks/src/surface-block/renderer.ts:28
viewportMaxXY ​
readonly
viewportMaxXY:IPoint
Source ​
packages/blocks/src/surface-block/renderer.ts:27
viewportMinXY ​
readonly
viewportMinXY:IPoint
Source ​
packages/blocks/src/surface-block/renderer.ts:26
viewportX ​
readonly
viewportX:number
Source ​
packages/blocks/src/surface-block/renderer.ts:24
viewportY ​
readonly
viewportY:number
Source ​
packages/blocks/src/surface-block/renderer.ts:25
width ​
readonly
width:number
Source ​
packages/blocks/src/surface-block/renderer.ts:18
zoom ​
readonly
zoom:number
Source ​
packages/blocks/src/surface-block/renderer.ts:23
Methods ​
addOverlay() ​
addOverlay(
overlay
):void
Parameters ​
• overlay: Overlay
Returns ​
void
Source ​
packages/blocks/src/surface-block/renderer.ts:39
applyDeltaCenter() ​
applyDeltaCenter(
deltaX
,deltaY
):void
Parameters ​
• deltaX: number
• deltaY: number
Returns ​
void
Source ​
packages/blocks/src/surface-block/renderer.ts:36
getCanvasByBound() ​
getCanvasByBound(
bound
,surfaceElements
?):HTMLCanvasElement
Parameters ​
• bound: IBound
• surfaceElements?: SurfaceElement
<ISurfaceElement
, ISurfaceElementLocalRecord
>[]
Returns ​
HTMLCanvasElement
Source ​
packages/blocks/src/surface-block/renderer.ts:42
isInViewport() ​
isInViewport(
bound
):boolean
Parameters ​
• bound: Bound
Returns ​
boolean
Source ​
packages/blocks/src/surface-block/renderer.ts:37
removeOverlay() ​
removeOverlay(
overlay
):void
Parameters ​
• overlay: Overlay
Returns ​
void
Source ​
packages/blocks/src/surface-block/renderer.ts:40
setCenter() ​
setCenter(
centerX
,centerY
):void
Parameters ​
• centerX: number
• centerY: number
Returns ​
void
Source ​
packages/blocks/src/surface-block/renderer.ts:34
setZoom() ​
setZoom(
zoom
,focusPoint
?):void
Parameters ​
• zoom: number
• focusPoint?: IPoint
Returns ​
void
Source ​
packages/blocks/src/surface-block/renderer.ts:35
toModelCoord() ​
toModelCoord(
viewX
,viewY
): [number
,number
]
Parameters ​
• viewX: number
• viewY: number
Returns ​
[number
, number
]
Source ​
packages/blocks/src/surface-block/renderer.ts:31
toViewCoord() ​
toViewCoord(
logicalX
,logicalY
): [number
,number
]
Parameters ​
• logicalX: number
• logicalY: number
Returns ​
[number
, number
]
Source ​
packages/blocks/src/surface-block/renderer.ts:32
Generated using typedoc-plugin-markdown and TypeDoc