@netless/window-manager 0.4.46 → 0.4.48
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/CHANGELOG.md +8 -0
- package/dist/index.cjs.js +12 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +5 -4
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +12 -12
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +2 -2
- package/src/Cursor/index.ts +3 -1
- package/src/index.ts +2 -2
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
@@ -33,10 +33,10 @@ import type { ReconnectRefresher } from "./ReconnectRefresher";
|
|
33
33
|
import type { BoxManager } from "./BoxManager";
|
34
34
|
import type {
|
35
35
|
Displayer,
|
36
|
-
DisplayerState,
|
37
36
|
Room,
|
38
37
|
ScenesCallbacksNode,
|
39
38
|
SceneState,
|
39
|
+
RoomState,
|
40
40
|
} from "white-web-sdk";
|
41
41
|
import type { AddAppParams, BaseInsertParams, TeleBoxRect } from "./index";
|
42
42
|
import type {
|
@@ -646,7 +646,7 @@ export class AppManager {
|
|
646
646
|
}
|
647
647
|
}
|
648
648
|
|
649
|
-
private displayerStateListener = (state: Partial<
|
649
|
+
private displayerStateListener = (state: Partial<RoomState>) => {
|
650
650
|
const sceneState = state.sceneState;
|
651
651
|
if (sceneState) {
|
652
652
|
const scenePath = sceneState.scenePath;
|
package/src/Cursor/index.ts
CHANGED
@@ -10,6 +10,7 @@ import type { PositionType } from "../AttributesDelegate";
|
|
10
10
|
import type { Point, RoomMember, View } from "white-web-sdk";
|
11
11
|
import type { AppManager } from "../AppManager";
|
12
12
|
import { ApplianceMap } from "./icons";
|
13
|
+
import { findMemberByUid } from "../Helper";
|
13
14
|
|
14
15
|
export type EventType = {
|
15
16
|
type: PositionType;
|
@@ -113,7 +114,8 @@ export class CursorManager {
|
|
113
114
|
}, 48);
|
114
115
|
|
115
116
|
private updateCursor(event: EventType, clientX: number, clientY: number) {
|
116
|
-
|
117
|
+
const self = findMemberByUid(this.manager.room, this.manager.uid);
|
118
|
+
if (this.wrapperRect && this.manager.canOperate && this.canMoveCursor(self)) {
|
117
119
|
const view = event.type === "main" ? this.manager.mainView : this.focusView;
|
118
120
|
const point = this.getPoint(view, clientX, clientY);
|
119
121
|
if (point) {
|
package/src/index.ts
CHANGED
@@ -590,8 +590,8 @@ export class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
|
|
590
590
|
* 设置 ViewMode
|
591
591
|
*/
|
592
592
|
public setViewMode(mode: ViewMode): void {
|
593
|
-
if (mode === ViewMode.Broadcaster) {
|
594
|
-
if (this.canOperate) {
|
593
|
+
if (mode === ViewMode.Broadcaster || mode === ViewMode.Follower) {
|
594
|
+
if (this.canOperate && mode === ViewMode.Broadcaster) {
|
595
595
|
this.appManager?.mainViewProxy.setCameraAndSize();
|
596
596
|
}
|
597
597
|
this.appManager?.mainViewProxy.start();
|