@univerjs/engine-render v0.5.0-beta.1 • Docs
Class: ScrollBar
Extends
BaseScrollBar
Constructors
new ScrollBar()
new ScrollBar(view, props?): ScrollBar
Parameters
Parameter | Type |
---|---|
view | Viewport |
props ? | IScrollBarProps |
Returns
Overrides
BaseScrollBar.constructor
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:76
Properties
Property | Modifier | Type | Default value | Description | Inherited from | Defined in |
---|---|---|---|---|---|---|
_disposed | protected | boolean | false | - | BaseScrollBar._disposed | packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
_viewport | protected | Viewport | undefined | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:33 |
barBackgroundColor | public | string | 'rgba(255,255,255,0.5)' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:70 |
barBorder | public | number | 1 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:55 |
barBorderColor | public | string | 'rgba(255,255,255,0.7)' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:72 |
barSize | public | number | 14 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:53 |
enableHorizontal | public | boolean | true | - | BaseScrollBar.enableHorizontal | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:42 |
enableVertical | public | boolean | true | - | BaseScrollBar.enableVertical | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:44 |
horizonScrollTrack | public | Nullable <Rect <IRectProps >> | undefined | - | BaseScrollBar.horizonScrollTrack | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:58 |
horizontalBarWidth | public | number | 0 | - | BaseScrollBar.horizontalBarWidth | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:50 |
horizontalMinusMiniThumb | public | number | 0 | - | BaseScrollBar.horizontalMinusMiniThumb | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:48 |
horizontalThumbWidth | public | number | 0 | - | BaseScrollBar.horizontalThumbWidth | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:46 |
horizonThumbRect | public | Nullable <Rect <IRectProps >> | undefined | - | BaseScrollBar.horizonThumbRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:60 |
placeholderBarRect | public | Nullable <Rect <IRectProps >> | undefined | - | BaseScrollBar.placeholderBarRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:66 |
thumbActiveBackgroundColor | public | string | '#999999' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:68 |
thumbBackgroundColor | public | string | '#cccccc' | todo: @DR-univer。 Mainly inject themeService in order to obtain colors. | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:64 |
thumbHoverBackgroundColor | public | string | '#b2b2b2' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:66 |
thumbLengthRatio | public | number | 1 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:59 |
thumbMargin | public | number | 2 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:57 |
verticalBarHeight | public | number | 0 | - | BaseScrollBar.verticalBarHeight | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:54 |
verticalMinusMiniThumb | public | number | 0 | - | BaseScrollBar.verticalMinusMiniThumb | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:56 |
verticalScrollTrack | public | Nullable <Rect <IRectProps >> | undefined | - | BaseScrollBar.verticalScrollTrack | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:62 |
verticalThumbHeight | public | number | 0 | - | BaseScrollBar.verticalThumbHeight | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:52 |
verticalThumbRect | public | Nullable <Rect <IRectProps >> | undefined | - | BaseScrollBar.verticalThumbRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:64 |
Accessors
limitX
Get Signature
get limitX(): number
Returns
number
Inherited from
BaseScrollBar.limitX
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:68
limitY
Get Signature
get limitY(): number
Returns
number
Inherited from
BaseScrollBar.limitY
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:75
miniThumbRatioX
Get Signature
get miniThumbRatioX(): number
Returns
number
Inherited from
BaseScrollBar.miniThumbRatioX
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:122
miniThumbRatioY
Get Signature
get miniThumbRatioY(): number
Returns
number
Inherited from
BaseScrollBar.miniThumbRatioY
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:138
ratioScrollX
Get Signature
get ratioScrollX(): number
Returns
number
Inherited from
BaseScrollBar.ratioScrollX
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:82
ratioScrollY
Get Signature
get ratioScrollY(): number
Returns
number
Inherited from
BaseScrollBar.ratioScrollY
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:103
Methods
dispose()
dispose(): void
Returns
void
Overrides
BaseScrollBar.dispose
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:93
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
BaseScrollBar.disposeWithMe
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
BaseScrollBar.ensureNotDisposed
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:100
hasHorizonThumb()
hasHorizonThumb(): boolean
Returns
boolean
Inherited from
BaseScrollBar.hasHorizonThumb
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:188
hasVerticalThumb()
hasVerticalThumb(): boolean
Returns
boolean
Inherited from
BaseScrollBar.hasVerticalThumb
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:192
makeDirty()
makeDirty(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Overrides
BaseScrollBar.makeDirty
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:151
makeViewDirty()
makeViewDirty(state): void
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:161
pick()
pick(coord): null | Rect<IRectProps>
Parameters
Parameter | Type |
---|---|
coord | Vector2 |
Returns
null
| Rect
<IRectProps
>
Overrides
BaseScrollBar.pick
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:166
render()
render(
ctx,
left,
top): void
Parameters
Parameter | Type | Default value |
---|---|---|
ctx | UniverRenderingContext | undefined |
left | number | 0 |
top | number | 0 |
Returns
void
Overrides
BaseScrollBar.render
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:104
resize()
resize(
parentWidth,
parentHeight,
contentWidth,
contentHeight): void
Parameters
Parameter | Type | Default value |
---|---|---|
parentWidth | number | 0 |
parentHeight | number | 0 |
contentWidth | number | 0 |
contentHeight | number | 0 |
Returns
void
Overrides
BaseScrollBar.resize
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:127
setProps()
setProps(props?): void
Parameters
Parameter | Type |
---|---|
props ? | IScrollBarProps |
Returns
void
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:186
attachTo()
static attachTo(view, props?): ScrollBar
Parameters
Parameter | Type |
---|---|
view | Viewport |
props ? | IScrollBarProps |
Returns
Defined in
packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:89