@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

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar

Overrides

BaseScrollBar.constructor

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-BaseScrollBar._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:96
_viewportprotectedViewportundefined--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:33
barBackgroundColorpublicstring'rgba(255,255,255,0.5)'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:73
barBorderpublicnumber1--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:58
barBorderColorpublicstring'rgba(255,255,255,0.7)'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:75
barSizepublicnumber14The thickness of a scrolling bar.-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:56
enableHorizontalpublicbooleantrue-BaseScrollBar.enableHorizontalpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:48
enableVerticalpublicbooleantrue-BaseScrollBar.enableVerticalpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:50
horizonScrollTrackpublicNullable<Rect>undefined-BaseScrollBar.horizonScrollTrackpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:64
horizontalBarWidthpublicnumber0-BaseScrollBar.horizontalBarWidthpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:56
horizontalMinusMiniThumbpublicnumber0-BaseScrollBar.horizontalMinusMiniThumbpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:54
horizontalThumbWidthpublicnumber0-BaseScrollBar.horizontalThumbWidthpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:52
horizonThumbRectpublicNullable<Rect>undefined-BaseScrollBar.horizonThumbRectpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:66
minThumbSizeHpublicnumberMIN_THUMB_SIZEThe min width of horizon thumb.-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:80
minThumbSizeVpublicnumberMIN_THUMB_SIZEThe min height of vertical thumb.-packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:84
placeholderBarRectpublicNullable<Rect>undefined-BaseScrollBar.placeholderBarRectpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:72
thumbActiveBackgroundColorpublicstring'#999999'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:71
thumbBackgroundColorpublicstring'#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
thumbHoverBackgroundColorpublicstring'#b2b2b2'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:69
thumbLengthRatiopublicnumber1--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:62
thumbMarginpublicnumber2--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:60
verticalBarHeightpublicnumber0-BaseScrollBar.verticalBarHeightpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:60
verticalMinusMiniThumbpublicnumber0-BaseScrollBar.verticalMinusMiniThumbpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:62
verticalScrollTrackpublicNullable<Rect>undefined-BaseScrollBar.verticalScrollTrackpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:68
verticalThumbHeightpublicnumber0-BaseScrollBar.verticalThumbHeightpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:58
verticalThumbRectpublicNullable<Rect>undefined-BaseScrollBar.verticalThumbRectpackages/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

ParameterType
disposableDisposableLike

Returns

IDisposable

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

ParameterType
stateboolean

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

ParameterType
stateboolean

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

ParameterType
coordVector2

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

ParameterTypeDefault value
ctxUniverRenderingContextundefined
leftnumber0
topnumber0

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

ParameterTypeDefault value
parentWidthnumber0
parentHeightnumber0
contentWidthnumber0
contentHeightnumber0

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

ParameterType
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

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar