@codingame/monaco-vscode-layout-service-override 2.2.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/layout.d.ts +1 -0
- package/layout.js +10 -2
- package/package.json +2 -2
package/layout.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ declare class LayoutService extends Disposable implements ILayoutService, IWorkb
|
|
|
21
21
|
private sideBarPosition;
|
|
22
22
|
private panelPosition;
|
|
23
23
|
constructor(mainContainer?: HTMLElement);
|
|
24
|
+
onDidChangeMainEditorCenteredLayout: Event<any>;
|
|
24
25
|
whenActiveContainerStylesLoaded: Promise<void>;
|
|
25
26
|
hasMainWindowBorder(): boolean;
|
|
26
27
|
getMainWindowBorderRadius(): string | undefined;
|
package/layout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StandaloneServices } from 'vscode/vscode/vs/editor/standalone/browser/standaloneServices';
|
|
2
2
|
import { positionFromString, positionToString } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
3
3
|
import { ILayoutService } from 'vscode/vscode/vs/platform/layout/browser/layoutService';
|
|
4
|
-
import {
|
|
4
|
+
import { Event, Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
5
|
import { getActiveDocument, getWindows, isActiveDocument, getWindow, Dimension, isAncestorUsingFlowTo, getClientArea } from 'vscode/vscode/vs/base/browser/dom';
|
|
6
6
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
7
7
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite';
|
|
@@ -24,6 +24,7 @@ class LayoutService extends Disposable {
|
|
|
24
24
|
constructor(mainContainer = getWorkbenchContainer()) {
|
|
25
25
|
super();
|
|
26
26
|
this.mainContainer = mainContainer;
|
|
27
|
+
this.onDidChangeMainEditorCenteredLayout = Event.None;
|
|
27
28
|
this.whenActiveContainerStylesLoaded = Promise.resolve();
|
|
28
29
|
this._onDidLayoutContainer = this._register(new Emitter());
|
|
29
30
|
this.onDidLayoutContainer = this._onDidLayoutContainer.event;
|
|
@@ -255,7 +256,14 @@ class LayoutService extends Disposable {
|
|
|
255
256
|
}
|
|
256
257
|
return this.getPart(windowOrPart)?.getContainer();
|
|
257
258
|
}
|
|
258
|
-
|
|
259
|
+
else {
|
|
260
|
+
if (windowOrPart.document === this.mainContainer.ownerDocument) {
|
|
261
|
+
return this.mainContainer;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
return windowOrPart.document.body.getElementsByClassName('monaco-workbench')[0];
|
|
265
|
+
}
|
|
266
|
+
}
|
|
259
267
|
}
|
|
260
268
|
getPart(key) {
|
|
261
269
|
return this.parts.get(key);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-layout-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
21
|
+
"vscode": "npm:@codingame/monaco-vscode-api@3.1.0",
|
|
22
22
|
"vscode-marked": "npm:marked@=3.0.2"
|
|
23
23
|
}
|
|
24
24
|
}
|