mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Rename webview.viewColumn to the more generic webview.position
This commit is contained in:
parent
e16ec3c1ff
commit
4f880aaf59
|
@ -223,8 +223,8 @@ export class MarkdownPreview {
|
|||
}
|
||||
}
|
||||
|
||||
public get viewColumn(): vscode.ViewColumn | undefined {
|
||||
return this.editor.viewColumn;
|
||||
public get position(): vscode.ViewColumn | undefined {
|
||||
return this.editor.position;
|
||||
}
|
||||
|
||||
public isPreviewOf(resource: vscode.Uri): boolean {
|
||||
|
@ -237,10 +237,10 @@ export class MarkdownPreview {
|
|||
|
||||
public matchesResource(
|
||||
otherResource: vscode.Uri,
|
||||
otherViewColumn: vscode.ViewColumn | undefined,
|
||||
otherPosition: vscode.ViewColumn | undefined,
|
||||
otherLocked: boolean
|
||||
): boolean {
|
||||
if (this.viewColumn !== otherViewColumn) {
|
||||
if (this.position !== otherPosition) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ export class MarkdownPreview {
|
|||
}
|
||||
|
||||
public matches(otherPreview: MarkdownPreview): boolean {
|
||||
return this.matchesResource(otherPreview._resource, otherPreview.viewColumn, otherPreview.locked);
|
||||
return this.matchesResource(otherPreview._resource, otherPreview.position, otherPreview.locked);
|
||||
}
|
||||
|
||||
public reveal(viewColumn: vscode.ViewColumn) {
|
||||
|
|
4
src/vs/vscode.proposed.d.ts
vendored
4
src/vs/vscode.proposed.d.ts
vendored
|
@ -687,9 +687,9 @@ declare module 'vscode' {
|
|||
readonly options: WebviewPanelOptions;
|
||||
|
||||
/**
|
||||
* The column in which the panel is showing.
|
||||
* The editor position of the panel.
|
||||
*/
|
||||
readonly viewColumn?: ViewColumn;
|
||||
readonly position?: ViewColumn;
|
||||
|
||||
/**
|
||||
* Is the panel current visible?
|
||||
|
|
|
@ -150,22 +150,22 @@ export class ExtHostWebviewPanel implements vscode.WebviewPanel {
|
|||
return this._options;
|
||||
}
|
||||
|
||||
get viewColumn(): vscode.ViewColumn {
|
||||
get position(): vscode.ViewColumn {
|
||||
this.assertNotDisposed();
|
||||
return this._viewColumn;
|
||||
}
|
||||
|
||||
set position(value: vscode.ViewColumn) {
|
||||
this.assertNotDisposed();
|
||||
this._viewColumn = value;
|
||||
}
|
||||
|
||||
get visible(): boolean {
|
||||
this.assertNotDisposed();
|
||||
return this._visible;
|
||||
}
|
||||
|
||||
set viewColumn(value: vscode.ViewColumn) {
|
||||
this.assertNotDisposed();
|
||||
this._viewColumn = value;
|
||||
}
|
||||
|
||||
set active(value: boolean) {
|
||||
set visible(value: boolean) {
|
||||
this.assertNotDisposed();
|
||||
this._visible = value;
|
||||
}
|
||||
|
@ -244,9 +244,9 @@ export class ExtHostWebviews implements ExtHostWebviewsShape {
|
|||
const panel = this.getWebviewPanel(handle);
|
||||
if (panel) {
|
||||
const viewColumn = typeConverters.toViewColumn(position);
|
||||
if (panel.active !== active || panel.viewColumn !== viewColumn) {
|
||||
panel.active = active;
|
||||
panel.viewColumn = viewColumn;
|
||||
if (panel.visible !== active || panel.position !== viewColumn) {
|
||||
panel.visible = active;
|
||||
panel.position = viewColumn;
|
||||
panel.onDidChangeViewStateEmitter.fire({ webviewPanel: panel });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue