You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.4 KiB

4 months ago
import { Component } from '../../core';
import type { Group } from '../../shapes';
import type { ScrollbarOptions, ScrollbarStyleProps } from './types';
export type { ScrollbarOptions, ScrollbarStyleProps };
export declare class Scrollbar extends Component<ScrollbarStyleProps> {
static tag: string;
private slider;
private range;
private get padding();
constructor(options: ScrollbarOptions);
private get value();
private get trackLength();
private get availableSpace();
private get trackRadius();
private get thumbRadius();
/**
* accord to thumbLen and value, calculate the values of slider
*/
private getValues;
getValue(): number;
private renderSlider;
render(attributes: ScrollbarStyleProps, container: Group): void;
/**
* value
* @param value
*/
setValue(value: number, animate?: boolean): void;
/**
*
*/
private onValueChange;
bindEvents(): void;
/**
* orient取出对应轴向上的值
* orient方向上的位置
*/
private getOrientVal;
/**
*
*/
private onTrackClick;
/**
*
*/
private onHover;
private onThumbMouseenter;
private onTrackMouseenter;
private onThumbMouseleave;
private onTrackMouseleave;
}