@netless/window-manager 0.3.16-canary.2 → 0.3.16-canary.3
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/dist/BoxManager.d.ts +2 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +3 -0
- package/src/BoxManager.ts +12 -2
- package/src/index.ts +1 -1
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
package/src/BoxManager.ts
CHANGED
@@ -268,8 +268,8 @@ export class BoxManager {
|
|
268
268
|
this.teleBoxManager.update(appId, { x, y }, true);
|
269
269
|
}
|
270
270
|
|
271
|
-
public focusBox({ appId }: AppId): void {
|
272
|
-
this.teleBoxManager.update(appId, { focus: true },
|
271
|
+
public focusBox({ appId }: AppId, skipUpdate = true): void {
|
272
|
+
this.teleBoxManager.update(appId, { focus: true }, skipUpdate);
|
273
273
|
}
|
274
274
|
|
275
275
|
public resizeBox({ appId, width, height, skipUpdate }: ResizeBoxParams): void {
|
@@ -315,6 +315,16 @@ export class BoxManager {
|
|
315
315
|
this.teleBoxManager.setMinimized(minimized, skipUpdate);
|
316
316
|
}
|
317
317
|
|
318
|
+
public focusTopBox(): void {
|
319
|
+
const boxes = this.teleBoxManager.query();
|
320
|
+
if (boxes.length >= 1) {
|
321
|
+
const box = this.getTopBox();
|
322
|
+
if (box) {
|
323
|
+
this.focusBox({ appId: box.id }, false);
|
324
|
+
}
|
325
|
+
}
|
326
|
+
}
|
327
|
+
|
318
328
|
public setReadonly(readonly: boolean) {
|
319
329
|
this.teleBoxManager.setReadonly(readonly);
|
320
330
|
}
|
package/src/index.ts
CHANGED
@@ -176,7 +176,7 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes> {
|
|
176
176
|
public static containerSizeRatio = DEFAULT_CONTAINER_RATIO;
|
177
177
|
private static isCreated = false;
|
178
178
|
|
179
|
-
public version = "0.3.16-canary.
|
179
|
+
public version = "0.3.16-canary.3";
|
180
180
|
|
181
181
|
public appListeners?: AppListeners;
|
182
182
|
|