@netless/window-manager 0.4.46 → 0.4.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.46",
3
+ "version": "0.4.47",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
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<DisplayerState>) => {
649
+ private displayerStateListener = (state: Partial<RoomState>) => {
650
650
  const sceneState = state.sceneState;
651
651
  if (sceneState) {
652
652
  const scenePath = sceneState.scenePath;
@@ -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
- if (this.wrapperRect && this.manager.canOperate) {
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) {