@netless/window-manager 1.0.7-beta.9 → 1.0.8
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/index.d.ts +0 -2
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AppListener.ts +17 -17
- package/src/AppManager.ts +0 -4
- package/src/index.ts +2 -2
package/package.json
CHANGED
package/src/AppListener.ts
CHANGED
|
@@ -50,14 +50,14 @@ export class AppListeners {
|
|
|
50
50
|
this.setMainViewScenePathHandler(data.payload);
|
|
51
51
|
break;
|
|
52
52
|
}
|
|
53
|
-
case Events.MoveCamera: {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
case Events.MoveCameraToContain: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
53
|
+
// case Events.MoveCamera: {
|
|
54
|
+
// this.moveCameraHandler(data.payload);
|
|
55
|
+
// break;
|
|
56
|
+
// }
|
|
57
|
+
// case Events.MoveCameraToContain: {
|
|
58
|
+
// this.moveCameraToContainHandler(data.payload);
|
|
59
|
+
// break;
|
|
60
|
+
// }
|
|
61
61
|
case Events.CursorMove: {
|
|
62
62
|
this.cursorMoveHandler(data.payload);
|
|
63
63
|
break;
|
|
@@ -102,16 +102,16 @@ export class AppListeners {
|
|
|
102
102
|
callbacks.emit("mainViewScenePathChange", nextScenePath);
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
private moveCameraHandler = (
|
|
106
|
-
|
|
107
|
-
) => {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
};
|
|
105
|
+
// private moveCameraHandler = (
|
|
106
|
+
// payload: Camera & { animationMode?: AnimationMode | undefined }
|
|
107
|
+
// ) => {
|
|
108
|
+
// if (isEqual(omit(payload, ["animationMode"]), { ...this.manager.mainView.camera })) return;
|
|
109
|
+
// this.manager.mainView.moveCamera(payload);
|
|
110
|
+
// };
|
|
111
111
|
|
|
112
|
-
private moveCameraToContainHandler = (payload: any) => {
|
|
113
|
-
|
|
114
|
-
};
|
|
112
|
+
// private moveCameraToContainHandler = (payload: any) => {
|
|
113
|
+
// this.manager.mainView.moveCameraToContain(payload);
|
|
114
|
+
// };
|
|
115
115
|
|
|
116
116
|
private cursorMoveHandler = (payload: any) => {
|
|
117
117
|
internalEmitter.emit("cursorMove", payload);
|
package/src/AppManager.ts
CHANGED
|
@@ -345,15 +345,12 @@ export class AppManager {
|
|
|
345
345
|
private async onCreated() {
|
|
346
346
|
if (Object.keys(this.attributes.apps).length && this.store.focus) {
|
|
347
347
|
this._focusAppId = this.store.focus;
|
|
348
|
-
console.log("onCreated===>", this._focusAppId);
|
|
349
348
|
await new Promise<AppProxy | undefined>(resolve => {
|
|
350
349
|
this._focusAppCreatedResolve = resolve;
|
|
351
350
|
this._resolveTimer = setTimeout(() => {
|
|
352
|
-
console.log("onCreated===>3333", this._focusAppId);
|
|
353
351
|
resolve(this.appProxies.get(this._focusAppId || ''));
|
|
354
352
|
}, 500);
|
|
355
353
|
}).then(() => {
|
|
356
|
-
console.log("onCreated===>2222", this._focusAppId);
|
|
357
354
|
this.focusByAttributes(this.attributes.apps);
|
|
358
355
|
});
|
|
359
356
|
}
|
|
@@ -624,7 +621,6 @@ export class AppManager {
|
|
|
624
621
|
this._focusAppId === id &&
|
|
625
622
|
this._focusAppCreatedResolve
|
|
626
623
|
) {
|
|
627
|
-
console.log("onCreated===>4444", this._focusAppId);
|
|
628
624
|
if (this._resolveTimer) {
|
|
629
625
|
clearTimeout(this._resolveTimer);
|
|
630
626
|
}
|
package/src/index.ts
CHANGED
|
@@ -972,7 +972,7 @@ export class WindowManager
|
|
|
972
972
|
const mainViewCamera = { ...this.mainView.camera };
|
|
973
973
|
if (isEqual({ ...mainViewCamera, ...pureCamera }, mainViewCamera)) return;
|
|
974
974
|
this.mainView.moveCamera(camera);
|
|
975
|
-
this.appManager?.dispatchInternalEvent(Events.MoveCamera, camera);
|
|
975
|
+
// this.appManager?.dispatchInternalEvent(Events.MoveCamera, camera);
|
|
976
976
|
setTimeout(() => {
|
|
977
977
|
this.appManager?.mainViewProxy.setCameraAndSize();
|
|
978
978
|
}, 500);
|
|
@@ -985,7 +985,7 @@ export class WindowManager
|
|
|
985
985
|
}>
|
|
986
986
|
): void {
|
|
987
987
|
this.mainView.moveCameraToContain(rectangle);
|
|
988
|
-
this.appManager?.dispatchInternalEvent(Events.MoveCameraToContain, rectangle);
|
|
988
|
+
// this.appManager?.dispatchInternalEvent(Events.MoveCameraToContain, rectangle);
|
|
989
989
|
setTimeout(() => {
|
|
990
990
|
this.appManager?.mainViewProxy.setCameraAndSize();
|
|
991
991
|
}, 500);
|