API > @blocksuite/blocks > SurfaceViewport
Interface: SurfaceViewport ​
Properties ​
boundingClientRect ​
readonly
boundingClientRect:DOMRect
Defined In ​
packages/blocks/src/surface-block/renderer.ts:27
center ​
readonly
center:IPoint
Defined In ​
packages/blocks/src/surface-block/renderer.ts:18
centerX ​
readonly
centerX:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:19
centerY ​
readonly
centerY:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:20
height ​
readonly
height:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:17
left ​
readonly
left:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:14
top ​
readonly
top:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:15
viewportBounds ​
readonly
viewportBounds:Bound
Defined In ​
packages/blocks/src/surface-block/renderer.ts:26
viewportMaxXY ​
readonly
viewportMaxXY:IPoint
Defined In ​
packages/blocks/src/surface-block/renderer.ts:25
viewportMinXY ​
readonly
viewportMinXY:IPoint
Defined In ​
packages/blocks/src/surface-block/renderer.ts:24
viewportX ​
readonly
viewportX:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:22
viewportY ​
readonly
viewportY:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:23
width ​
readonly
width:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:16
zoom ​
readonly
zoom:number
Defined In ​
packages/blocks/src/surface-block/renderer.ts:21
Methods ​
addOverlay ​
addOverlay(
overlay
):void
Parameters ​
Parameter | Type |
---|---|
overlay | Overlay |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/renderer.ts:37
applyDeltaCenter ​
applyDeltaCenter(
deltaX
,deltaY
):void
Parameters ​
Parameter | Type |
---|---|
deltaX | number |
deltaY | number |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/renderer.ts:34
getCanvasByBound ​
getCanvasByBound(
bound
,surfaceElements
?):HTMLCanvasElement
Parameters ​
Parameter | Type |
---|---|
bound | IBound |
surfaceElements ? | SurfaceElement < ISurfaceElement , ISurfaceElementLocalRecord >[] |
Returns ​
HTMLCanvasElement
Defined In ​
packages/blocks/src/surface-block/renderer.ts:40
isInViewport ​
isInViewport(
bound
):boolean
Parameters ​
Parameter | Type |
---|---|
bound | Bound |
Returns ​
boolean
Defined In ​
packages/blocks/src/surface-block/renderer.ts:35
removeOverlay ​
removeOverlay(
overlay
):void
Parameters ​
Parameter | Type |
---|---|
overlay | Overlay |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/renderer.ts:38
setCenter ​
setCenter(
centerX
,centerY
):void
Parameters ​
Parameter | Type |
---|---|
centerX | number |
centerY | number |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/renderer.ts:32
setZoom ​
setZoom(
zoom
,focusPoint
?):void
Parameters ​
Parameter | Type |
---|---|
zoom | number |
focusPoint ? | IPoint |
Returns ​
void
Defined In ​
packages/blocks/src/surface-block/renderer.ts:33
toModelCoord ​
toModelCoord(
viewX
,viewY
): [number
,number
]
Parameters ​
Parameter | Type |
---|---|
viewX | number |
viewY | number |
Returns ​
[number
, number
]
Defined In ​
packages/blocks/src/surface-block/renderer.ts:29
toViewCoord ​
toViewCoord(
logicalX
,logicalY
): [number
,number
]
Parameters ​
Parameter | Type |
---|---|
logicalX | number |
logicalY | number |
Returns ​
[number
, number
]
Defined In ​
packages/blocks/src/surface-block/renderer.ts:30