mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Remove unnecessary code
This commit is contained in:
parent
8b2ea6ca87
commit
ce15df0f6b
|
@ -152,10 +152,6 @@ export class ScrollableElement extends Widget {
|
|||
this._verticalScrollbar.delegateSliderMouseDown(e, onDragFinished);
|
||||
}
|
||||
|
||||
public getVerticalSliderVerticalCenter(): number {
|
||||
return this._verticalScrollbar.getVerticalSliderVerticalCenter();
|
||||
}
|
||||
|
||||
public updateState(newState: INewScrollState): void {
|
||||
this._scrollable.updateState(newState);
|
||||
}
|
||||
|
|
|
@ -59,10 +59,6 @@ export class VerticalScrollbar extends AbstractScrollbar {
|
|||
this._createSlider(0, Math.floor((options.verticalScrollbarSize - options.verticalSliderSize) / 2), options.verticalSliderSize, null);
|
||||
}
|
||||
|
||||
public getVerticalSliderVerticalCenter(): number {
|
||||
return this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderCenter();
|
||||
}
|
||||
|
||||
protected _updateSlider(sliderSize: number, sliderPosition: number): void {
|
||||
this.slider.setHeight(sliderSize);
|
||||
this.slider.setTop(sliderPosition);
|
||||
|
|
|
@ -209,7 +209,7 @@ export class View extends ViewEventHandler {
|
|||
let rulers = new Rulers(this._context);
|
||||
this.viewParts.push(rulers);
|
||||
|
||||
let minimap = new Minimap(this._context, this._scrollbar);
|
||||
let minimap = new Minimap(this._context);
|
||||
this.viewParts.push(minimap);
|
||||
|
||||
// -------------- Wire dom nodes up
|
||||
|
|
|
@ -119,10 +119,6 @@ export class EditorScrollbar extends ViewPart {
|
|||
this.scrollbar.delegateSliderMouseDown(e, onDragFinished);
|
||||
}
|
||||
|
||||
public getVerticalSliderVerticalCenter(): number {
|
||||
return this.scrollbar.getVerticalSliderVerticalCenter();
|
||||
}
|
||||
|
||||
// --- begin event handlers
|
||||
|
||||
public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean {
|
||||
|
|
|
@ -18,7 +18,6 @@ import { ViewLineData } from 'vs/editor/common/viewModel/viewModel';
|
|||
import { ColorId } from 'vs/editor/common/modes';
|
||||
import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar';
|
||||
import { RenderedLinesCollection, ILine } from 'vs/editor/browser/view/viewLayer';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { RGBA } from 'vs/base/common/color';
|
||||
|
@ -207,7 +206,6 @@ class MinimapLayout {
|
|||
viewportHeight: number,
|
||||
viewportContainsWhitespaceGaps: boolean,
|
||||
lineCount: number,
|
||||
scrollbarSliderCenter: number,
|
||||
scrollTop: number,
|
||||
scrollHeight: number
|
||||
): MinimapLayout {
|
||||
|
@ -409,8 +407,6 @@ class MinimapBuffers {
|
|||
|
||||
export class Minimap extends ViewPart {
|
||||
|
||||
private readonly _editorScrollbar: EditorScrollbar;
|
||||
|
||||
private readonly _domNode: FastDomNode<HTMLElement>;
|
||||
private readonly _shadow: FastDomNode<HTMLElement>;
|
||||
private readonly _canvas: FastDomNode<HTMLCanvasElement>;
|
||||
|
@ -427,9 +423,8 @@ export class Minimap extends ViewPart {
|
|||
private _lastRenderData: RenderData;
|
||||
private _buffers: MinimapBuffers;
|
||||
|
||||
constructor(context: ViewContext, editorScrollbar: EditorScrollbar) {
|
||||
constructor(context: ViewContext) {
|
||||
super(context);
|
||||
this._editorScrollbar = editorScrollbar;
|
||||
|
||||
this._options = new MinimapOptions(this._context.configuration);
|
||||
this._lastRenderData = null;
|
||||
|
@ -655,7 +650,6 @@ export class Minimap extends ViewPart {
|
|||
renderingCtx.viewportHeight,
|
||||
(renderingCtx.viewportData.whitespaceViewportData.length > 0),
|
||||
this._context.model.getLineCount(),
|
||||
this._editorScrollbar.getVerticalSliderVerticalCenter(),
|
||||
renderingCtx.scrollTop,
|
||||
renderingCtx.scrollHeight
|
||||
);
|
||||
|
|
|
@ -217,7 +217,7 @@
|
|||
"**/vs/base/parts/*/{common,browser}/**",
|
||||
"**/vs/platform/*/{common,browser}/**",
|
||||
"**/vs/editor/{common,browser}/**",
|
||||
"**/vs/editor/contrib/quickOpen/**",
|
||||
"**/vs/editor/contrib/**",
|
||||
"**/vs/editor/standalone/{common,browser}/**"
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue