提交 83ee1c98 编写于 作者: A Alex Dima

Clean up in scrollableElement

上级 585465c0
......@@ -8,7 +8,7 @@ import * as Browser from 'vs/base/browser/browser';
import * as Platform from 'vs/base/common/platform';
import * as DomUtils from 'vs/base/browser/dom';
import {IMouseEvent, StandardMouseEvent} from 'vs/base/browser/mouseEvent';
import {IMouseWheelEvent, IParent, Visibility, IScrollbar} from 'vs/base/browser/ui/scrollbar/scrollableElement';
import {IMouseWheelEvent, IParent, Visibility} from 'vs/base/browser/ui/scrollbar/scrollableElement';
import {Disposable} from 'vs/base/common/lifecycle';
import {GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger} from 'vs/base/browser/globalMouseMoveMonitor';
import {Widget} from 'vs/base/browser/ui/widget';
......@@ -374,7 +374,7 @@ export interface IMouseMoveEventData {
posy: number;
}
export abstract class AbstractScrollbar extends Widget implements IScrollbar {
export abstract class AbstractScrollbar extends Widget {
protected _forbidTranslate3dUse: boolean;
private _lazyRender: boolean;
......
......@@ -4,8 +4,6 @@
*--------------------------------------------------------------------------------------------*/
'use strict';
import {FastDomNode} from 'vs/base/browser/styleMutator';
export interface IScrollableElementCreationOptions {
/**
* Prevent the scrollbar rendering from using translate3d. Defaults to false.
......@@ -130,10 +128,6 @@ export interface IDimensions {
*/
export interface IScrollableElement {
verticalScrollbarWidth: number;
horizontalScrollbarHeight: number;
/**
* Get the generated 'scrollable' dom node
*/
......@@ -185,21 +179,6 @@ export interface IMouseWheelEvent {
stopPropagation(): void;
}
export interface IScrollbar {
domNode: FastDomNode;
dispose(): void;
onElementSize(size: number): boolean;
onElementScrollSize(scrollSize: number): boolean;
onElementScrollPosition(scrollPosition: number): boolean;
beginReveal(): void;
beginHide(): void;
delegateMouseDown(browserEvent: MouseEvent): void;
validateScrollPosition(scrollPosition: number): number;
setDesiredScrollPosition(scrollPosition: number): boolean;
render(): void;
}
export interface IParent {
onMouseWheel(mouseWheelEvent: IMouseWheelEvent): void;
onDragStart(): void;
......
......@@ -12,7 +12,7 @@ import {StandardMouseWheelEvent, IMouseEvent} from 'vs/base/browser/mouseEvent';
import {HorizontalScrollbar} from 'vs/base/browser/ui/scrollbar/horizontalScrollbar';
import {VerticalScrollbar} from 'vs/base/browser/ui/scrollbar/verticalScrollbar';
import {
IScrollableElementOptions, IScrollbar, IDimensions, IMouseWheelEvent, visibilityFromString,
IScrollableElementOptions, IDimensions, IMouseWheelEvent, visibilityFromString,
IScrollableElement, IScrollableElementCreationOptions, IOverviewRulerLayoutInfo
} from 'vs/base/browser/ui/scrollbar/scrollableElement';
import {IDisposable, dispose} from 'vs/base/common/lifecycle';
......@@ -28,10 +28,8 @@ export class ScrollableElement extends Widget implements IScrollableElement {
private _options: IScrollableElementOptions;
private _scrollable: DelegateScrollable;
public verticalScrollbarWidth: number;
public horizontalScrollbarHeight: number;
private _verticalScrollbar: IScrollbar;
private _horizontalScrollbar: IScrollbar;
private _verticalScrollbar: VerticalScrollbar;
private _horizontalScrollbar: HorizontalScrollbar;
private _domNode: HTMLElement;
private _leftShadowDomNode: FastDomNode;
......@@ -56,9 +54,6 @@ export class ScrollableElement extends Widget implements IScrollableElement {
this._scrollable = this._register(new DelegateScrollable(scrollable, () => this._onScroll()));
this.verticalScrollbarWidth = this._options.verticalScrollbarSize;
this.horizontalScrollbarHeight = this._options.horizontalScrollbarSize;
this._verticalScrollbar = this._register(new VerticalScrollbar(this._scrollable, this, this._options));
this._horizontalScrollbar = this._register(new HorizontalScrollbar(this._scrollable, this, this._options));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册