API Reference
@univerjs
@univerjs/engine-render
classes
Scrollbar

@univerjs/engine-render v0.4.2Docs


Class: ScrollBar

Extends

  • BaseScrollBar

Constructors

new ScrollBar()

new ScrollBar(view, props?): ScrollBar

Parameters

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar

Overrides

BaseScrollBar.constructor

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:76 (opens in a new tab)

Properties

PropertyModifierTypeDefault valueDescriptionInherited fromDefined in
_disposedprotectedbooleanfalse-BaseScrollBar._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93 (opens in a new tab)
_viewportprotectedViewportundefined--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:33 (opens in a new tab)
barBackgroundColorpublicstring'rgba(255,255,255,0.5)'--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:70 (opens in a new tab)
barBorderpublicnumber1--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:55 (opens in a new tab)
barBorderColorpublicstring'rgba(255,255,255,0.7)'--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:72 (opens in a new tab)
barSizepublicnumber14--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:53 (opens in a new tab)
enableHorizontalpublicbooleantrue-BaseScrollBar.enableHorizontalsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:42 (opens in a new tab)
enableVerticalpublicbooleantrue-BaseScrollBar.enableVerticalsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:44 (opens in a new tab)
horizonScrollTrackpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.horizonScrollTracksubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:58 (opens in a new tab)
horizonThumbRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.horizonThumbRectsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:60 (opens in a new tab)
horizontalBarWidthpublicnumber0-BaseScrollBar.horizontalBarWidthsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:50 (opens in a new tab)
horizontalMinusMiniThumbpublicnumber0-BaseScrollBar.horizontalMinusMiniThumbsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:48 (opens in a new tab)
horizontalThumbWidthpublicnumber0-BaseScrollBar.horizontalThumbWidthsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:46 (opens in a new tab)
placeholderBarRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.placeholderBarRectsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:66 (opens in a new tab)
thumbActiveBackgroundColorpublicstring'#999999'--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:68 (opens in a new tab)
thumbBackgroundColorpublicstring'#cccccc'todo: @DR-univer。 Mainly inject themeService in order to obtain colors.-submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:64 (opens in a new tab)
thumbHoverBackgroundColorpublicstring'#b2b2b2'--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:66 (opens in a new tab)
thumbLengthRatiopublicnumber1--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:59 (opens in a new tab)
thumbMarginpublicnumber2--submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:57 (opens in a new tab)
verticalBarHeightpublicnumber0-BaseScrollBar.verticalBarHeightsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:54 (opens in a new tab)
verticalMinusMiniThumbpublicnumber0-BaseScrollBar.verticalMinusMiniThumbsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:56 (opens in a new tab)
verticalScrollTrackpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.verticalScrollTracksubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:62 (opens in a new tab)
verticalThumbHeightpublicnumber0-BaseScrollBar.verticalThumbHeightsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:52 (opens in a new tab)
verticalThumbRectpublicNullable<Rect<IRectProps>>undefined-BaseScrollBar.verticalThumbRectsubmodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:64 (opens in a new tab)

Accessors

limitX

get limitX(): number

Returns

number

Inherited from

BaseScrollBar.limitX

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:68 (opens in a new tab)


limitY

get limitY(): number

Returns

number

Inherited from

BaseScrollBar.limitY

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:75 (opens in a new tab)


miniThumbRatioX

get miniThumbRatioX(): number

Returns

number

Inherited from

BaseScrollBar.miniThumbRatioX

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:122 (opens in a new tab)


miniThumbRatioY

get miniThumbRatioY(): number

Returns

number

Inherited from

BaseScrollBar.miniThumbRatioY

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:138 (opens in a new tab)


ratioScrollX

get ratioScrollX(): number

Returns

number

Inherited from

BaseScrollBar.ratioScrollX

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:82 (opens in a new tab)


ratioScrollY

get ratioScrollY(): number

Returns

number

Inherited from

BaseScrollBar.ratioScrollY

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:103 (opens in a new tab)

Methods

dispose()

dispose(): void

Returns

void

Overrides

BaseScrollBar.dispose

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:93 (opens in a new tab)


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

BaseScrollBar.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96 (opens in a new tab)


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

BaseScrollBar.ensureNotDisposed

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:100 (opens in a new tab)


hasHorizonThumb()

hasHorizonThumb(): boolean

Returns

boolean

Inherited from

BaseScrollBar.hasHorizonThumb

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:188 (opens in a new tab)


hasVerticalThumb()

hasVerticalThumb(): boolean

Returns

boolean

Inherited from

BaseScrollBar.hasVerticalThumb

Defined in

submodules/univer/packages/engine-render/src/shape/base-scroll-bar.ts:192 (opens in a new tab)


makeDirty()

makeDirty(state): void

Parameters

ParameterType
stateboolean

Returns

void

Overrides

BaseScrollBar.makeDirty

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:151 (opens in a new tab)


makeViewDirty()

makeViewDirty(state): void

Parameters

ParameterType
stateboolean

Returns

void

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:161 (opens in a new tab)


pick()

pick(coord): null | Rect<IRectProps>

Parameters

ParameterType
coordVector2

Returns

null | Rect<IRectProps>

Overrides

BaseScrollBar.pick

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:166 (opens in a new tab)


render()

render(
   ctx, 
   left, 
   top): void

Parameters

ParameterTypeDefault value
ctxUniverRenderingContextundefined
leftnumber0
topnumber0

Returns

void

Overrides

BaseScrollBar.render

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:104 (opens in a new tab)


resize()

resize(
   parentWidth, 
   parentHeight, 
   contentWidth, 
   contentHeight): void

Parameters

ParameterTypeDefault value
parentWidthnumber0
parentHeightnumber0
contentWidthnumber0
contentHeightnumber0

Returns

void

Overrides

BaseScrollBar.resize

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:127 (opens in a new tab)


setProps()

setProps(props?): void

Parameters

ParameterType
props?IScrollBarProps

Returns

void

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:186 (opens in a new tab)


attachTo()

static attachTo(view, props?): ScrollBar

Parameters

ParameterType
viewViewport
props?IScrollBarProps

Returns

ScrollBar

Defined in

submodules/univer/packages/engine-render/src/shape/scroll-bar.ts:89 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.