@netless/window-manager 0.4.0-canary.18 → 0.4.0-canary.21
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/.idea/inspectionProfiles/Project_Default.xml +7 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/window-manager.iml +12 -0
- package/dist/Cursor/index.d.ts +0 -1
- package/dist/View/MainView.d.ts +1 -1
- package/dist/index.es.js +5 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +1 -0
- package/src/AppProxy.ts +2 -0
- package/src/Cursor/index.ts +7 -5
- package/src/View/MainView.ts +7 -1
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
package/src/AppProxy.ts
CHANGED
@@ -187,6 +187,8 @@ export class AppProxy {
|
|
187
187
|
});
|
188
188
|
if (this.isAddApp && this.box) {
|
189
189
|
this.store.updateAppState(appId, AppAttributes.ZIndex, this.box.zIndex);
|
190
|
+
this.store.setAppFocus(appId, true);
|
191
|
+
this.focusBox();
|
190
192
|
}
|
191
193
|
} catch (error: any) {
|
192
194
|
console.error(error);
|
package/src/Cursor/index.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { throttle } from "lodash";
|
2
2
|
import { Cursor } from "./Cursor";
|
3
3
|
import { CursorState, Events } from "../constants";
|
4
4
|
import { emitter, WindowManager } from "../index";
|
@@ -45,6 +45,12 @@ export class CursorManager {
|
|
45
45
|
cursorInstance.move(payload.position);
|
46
46
|
}
|
47
47
|
});
|
48
|
+
this.sideEffectManager.add(() => {
|
49
|
+
const unsubscribe = emitter.on("playgroundSizeChange", () => {
|
50
|
+
this.updateContainerRect();
|
51
|
+
});
|
52
|
+
return unsubscribe;
|
53
|
+
})
|
48
54
|
}
|
49
55
|
|
50
56
|
public setupWrapper(wrapper: HTMLElement) {
|
@@ -66,10 +72,6 @@ export class CursorManager {
|
|
66
72
|
this.mainViewElement = div;
|
67
73
|
}
|
68
74
|
|
69
|
-
private getUids = (members: readonly RoomMember[] | undefined) => {
|
70
|
-
return compact(uniq(members?.map(member => member.payload?.uid)));
|
71
|
-
};
|
72
|
-
|
73
75
|
public get boxState() {
|
74
76
|
return this.store.getBoxState();
|
75
77
|
}
|
package/src/View/MainView.ts
CHANGED
@@ -13,7 +13,6 @@ export class MainViewProxy {
|
|
13
13
|
private started = false;
|
14
14
|
private mainViewIsAddListener = false;
|
15
15
|
private mainView: View;
|
16
|
-
private viewId = "mainView";
|
17
16
|
private store = this.manager.store;
|
18
17
|
|
19
18
|
private sideEffectManager = new SideEffectManager();
|
@@ -104,6 +103,13 @@ export class MainViewProxy {
|
|
104
103
|
return mainView;
|
105
104
|
}
|
106
105
|
|
106
|
+
public onReconnect(): void {
|
107
|
+
const mainViewScenePath = this.store.getMainViewScenePath();
|
108
|
+
if (mainViewScenePath) {
|
109
|
+
setViewFocusScenePath(this.view, mainViewScenePath);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
107
113
|
private onCameraUpdatedByDevice = (camera: Camera) => {
|
108
114
|
this.store.setMainViewCamera({ ...camera, id: this.manager.uid });
|
109
115
|
if (!isEqual(this.mainViewSize, { ...this.mainView.size, id: this.manager.uid })) {
|