@univerjs/engine-render v0.5.0-beta.1 • Docs


Class: ScrollBar

Extends

  • BaseScrollBar

Constructors

new ScrollBar()

new ScrollBar(view, props?): ScrollBar

Parameters

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar

Overrides

BaseScrollBar.constructor

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:76

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-BaseScrollBar._disposedpackages/api/tmp/univer-pro/submodules/univer/packages/core/src/shared/lifecycle.ts:93
_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:70
barBorderpublicnumber1--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:55
barBorderColorpublicstring'rgba(255,255,255,0.7)'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:72
barSizepublicnumber14--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:53
enableHorizontalpublicbooleantrue-BaseScrollBar.enableHorizontalpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:42
enableVerticalpublicbooleantrue-BaseScrollBar.enableVerticalpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:44
horizonScrollTrackpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.horizonScrollTrackpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:58
horizontalBarWidthpublicnumber0-BaseScrollBar.horizontalBarWidthpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:50
horizontalMinusMiniThumbpublicnumber0-BaseScrollBar.horizontalMinusMiniThumbpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:48
horizontalThumbWidthpublicnumber0-BaseScrollBar.horizontalThumbWidthpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:46
horizonThumbRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.horizonThumbRectpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:60
placeholderBarRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.placeholderBarRectpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:66
thumbActiveBackgroundColorpublicstring'#999999'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:68
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:64
thumbHoverBackgroundColorpublicstring'#b2b2b2'--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:66
thumbLengthRatiopublicnumber1--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:59
thumbMarginpublicnumber2--packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:57
verticalBarHeightpublicnumber0-BaseScrollBar.verticalBarHeightpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:54
verticalMinusMiniThumbpublicnumber0-BaseScrollBar.verticalMinusMiniThumbpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:56
verticalScrollTrackpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.verticalScrollTrackpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:62
verticalThumbHeightpublicnumber0-BaseScrollBar.verticalThumbHeightpackages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:52
verticalThumbRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.verticalThumbRectpackages/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

ParameterType
disposableDisposableLike

Returns

IDisposable

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

ParameterType
stateboolean

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

ParameterType
stateboolean

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

ParameterType
coordVector2

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

ParameterTypeDefault value
ctxUniverRenderingContextundefined
leftnumber0
topnumber0

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

ParameterTypeDefault value
parentWidthnumber0
parentHeightnumber0
contentWidthnumber0
contentHeightnumber0

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

ParameterType
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

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar

Defined in

packages/api/tmp/univer-pro/submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:89