@univerjs/engine-render v0.5.4
Class: ScrollBar
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:32
Extends
BaseScrollBar
Constructors
new ScrollBar()
new ScrollBar(view, props?): ScrollBar
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:88
Parameters
Parameter | Type |
---|---|
view | Viewport |
props ? | IScrollBarProps |
Returns
Overrides
BaseScrollBar.constructor
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:96 |
_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:73 |
barBorder | public | number | 1 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:58 |
barBorderColor | public | string | 'rgba(255,255,255,0.7)' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:75 |
barSize | public | number | 14 | The thickness of a scrolling bar. | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:56 |
enableHorizontal | public | boolean | true | - | BaseScrollBar.enableHorizontal | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:48 |
enableVertical | public | boolean | true | - | BaseScrollBar.enableVertical | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:50 |
horizonScrollTrack | public | Nullable <Rect > | undefined | - | BaseScrollBar.horizonScrollTrack | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:64 |
horizontalBarWidth | public | number | 0 | - | BaseScrollBar.horizontalBarWidth | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:56 |
horizontalMinusMiniThumb | public | number | 0 | - | BaseScrollBar.horizontalMinusMiniThumb | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:54 |
horizontalThumbWidth | public | number | 0 | - | BaseScrollBar.horizontalThumbWidth | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:52 |
horizonThumbRect | public | Nullable <Rect > | undefined | - | BaseScrollBar.horizonThumbRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:66 |
minThumbSizeH | public | number | MIN_THUMB_SIZE | The min width of horizon thumb. | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:80 |
minThumbSizeV | public | number | MIN_THUMB_SIZE | The min height of vertical thumb. | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:84 |
placeholderBarRect | public | Nullable <Rect > | undefined | - | BaseScrollBar.placeholderBarRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:72 |
thumbActiveBackgroundColor | public | string | '#999999' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:71 |
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:67 |
thumbHoverBackgroundColor | public | string | '#b2b2b2' | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:69 |
thumbLengthRatio | public | number | 1 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:62 |
thumbMargin | public | number | 2 | - | - | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:60 |
verticalBarHeight | public | number | 0 | - | BaseScrollBar.verticalBarHeight | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:60 |
verticalMinusMiniThumb | public | number | 0 | - | BaseScrollBar.verticalMinusMiniThumb | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:62 |
verticalScrollTrack | public | Nullable <Rect > | undefined | - | BaseScrollBar.verticalScrollTrack | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:68 |
verticalThumbHeight | public | number | 0 | - | BaseScrollBar.verticalThumbHeight | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:58 |
verticalThumbRect | public | Nullable <Rect > | undefined | - | BaseScrollBar.verticalThumbRect | packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:70 |
Accessors
limitX
Get Signature
get limitX(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:74
Returns
number
Inherited from
BaseScrollBar.limitX
limitY
Get Signature
get limitY(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:81
Returns
number
Inherited from
BaseScrollBar.limitY
miniThumbRatioX
Get Signature
get miniThumbRatioX(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:128
Returns
number
Inherited from
BaseScrollBar.miniThumbRatioX
miniThumbRatioY
Get Signature
get miniThumbRatioY(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:144
Returns
number
Inherited from
BaseScrollBar.miniThumbRatioY
ratioScrollX
Get Signature
get ratioScrollX(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:88
Returns
number
Inherited from
BaseScrollBar.ratioScrollX
ratioScrollY
Get Signature
get ratioScrollY(): number
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:109
Returns
number
Inherited from
BaseScrollBar.ratioScrollY
Methods
dispose()
dispose(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:105
Returns
void
Overrides
BaseScrollBar.dispose
disposeWithMe()
disposeWithMe(disposable): IDisposable
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:99
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
BaseScrollBar.disposeWithMe
ensureNotDisposed()
protected ensureNotDisposed(): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:103
Returns
void
Inherited from
BaseScrollBar.ensureNotDisposed
hasHorizonThumb()
hasHorizonThumb(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:194
Returns
boolean
Inherited from
BaseScrollBar.hasHorizonThumb
hasVerticalThumb()
hasVerticalThumb(): boolean
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:198
Returns
boolean
Inherited from
BaseScrollBar.hasVerticalThumb
makeDirty()
makeDirty(state): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:163
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
Overrides
BaseScrollBar.makeDirty
makeViewDirty()
makeViewDirty(state): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:173
Parameters
Parameter | Type |
---|---|
state | boolean |
Returns
void
pick()
pick(coord): null | Rect
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:178
Parameters
Parameter | Type |
---|---|
coord | Vector2 |
Returns
null
| Rect
Overrides
BaseScrollBar.pick
render()
render(
ctx,
left,
top): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:116
Parameters
Parameter | Type | Default value |
---|---|---|
ctx | UniverRenderingContext | undefined |
left | number | 0 |
top | number | 0 |
Returns
void
Overrides
BaseScrollBar.render
resize()
resize(
parentWidth,
parentHeight,
contentWidth,
contentHeight): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:139
Parameters
Parameter | Type | Default value |
---|---|---|
parentWidth | number | 0 |
parentHeight | number | 0 |
contentWidth | number | 0 |
contentHeight | number | 0 |
Returns
void
Overrides
BaseScrollBar.resize
setProps()
setProps(props?): void
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:198
Parameters
Parameter | Type |
---|---|
props ? | IScrollBarProps |
Returns
void
attachTo()
static attachTo(view, props?): ScrollBar
Defined in: packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:101
Parameters
Parameter | Type |
---|---|
view | Viewport |
props ? | IScrollBarProps |