diff --git a/desktop/renderer-app/src/stores/whiteboard-store.ts b/desktop/renderer-app/src/stores/whiteboard-store.ts index 7e33741ea3d..0ea850d0e68 100644 --- a/desktop/renderer-app/src/stores/whiteboard-store.ts +++ b/desktop/renderer-app/src/stores/whiteboard-store.ts @@ -10,6 +10,7 @@ import { makeAutoObservable, observable, runInAction } from "mobx"; import { isMobile, isWindows } from "react-device-detect"; import { AnimationMode, + ApplianceNames, DeviceType, Room, RoomPhase, @@ -555,6 +556,8 @@ export class WhiteboardStore { // width: width, // height: height, // }); + + windowManager.mainView.setMemberState({ currentApplianceName: ApplianceNames.selector }); }; public insertMediaFile = async (file: CloudStorageFile): Promise => { diff --git a/desktop/renderer-app/src/utils/drag-and-drop/image.ts b/desktop/renderer-app/src/utils/drag-and-drop/image.ts index 7d1e88565fe..85205701500 100644 --- a/desktop/renderer-app/src/utils/drag-and-drop/image.ts +++ b/desktop/renderer-app/src/utils/drag-and-drop/image.ts @@ -1,6 +1,6 @@ import { message } from "antd"; import { v4 as v4uuid } from "uuid"; -import type { Room, Size } from "white-web-sdk"; +import { ApplianceNames, Room, Size } from "white-web-sdk"; import { listFiles } from "../../api-middleware/flatServer/storage"; import { i18n } from "../i18n"; import { UploadTask } from "../upload-task-manager/upload-task"; @@ -50,6 +50,7 @@ export async function onDropImage(file: File, x: number, y: number, room: Room): const { width, height } = await getSize; room.insertImage({ uuid, centerX: x, centerY: y, width, height, locked: false }); room.completeImageUpload(uuid, cloudFile.fileURL); + room.setMemberState({ currentApplianceName: ApplianceNames.selector }); } export function getImageSize(file: File): Promise { diff --git a/web/flat-web/src/stores/whiteboard-store.ts b/web/flat-web/src/stores/whiteboard-store.ts index 02978f3bf29..3c6f4fe4635 100644 --- a/web/flat-web/src/stores/whiteboard-store.ts +++ b/web/flat-web/src/stores/whiteboard-store.ts @@ -10,6 +10,7 @@ import { isMobile, isWindows } from "react-device-detect"; import { v4 as v4uuid } from "uuid"; import { AnimationMode, + ApplianceNames, DeviceType, Room, RoomPhase, @@ -524,6 +525,8 @@ export class WhiteboardStore { // width: width, // height: height, // }); + + windowManager.mainView.setMemberState({ currentApplianceName: ApplianceNames.selector }); }; public insertMediaFile = async (file: CloudStorageFile): Promise => { diff --git a/web/flat-web/src/utils/drag-and-drop/image.ts b/web/flat-web/src/utils/drag-and-drop/image.ts index 7d1e88565fe..85205701500 100644 --- a/web/flat-web/src/utils/drag-and-drop/image.ts +++ b/web/flat-web/src/utils/drag-and-drop/image.ts @@ -1,6 +1,6 @@ import { message } from "antd"; import { v4 as v4uuid } from "uuid"; -import type { Room, Size } from "white-web-sdk"; +import { ApplianceNames, Room, Size } from "white-web-sdk"; import { listFiles } from "../../api-middleware/flatServer/storage"; import { i18n } from "../i18n"; import { UploadTask } from "../upload-task-manager/upload-task"; @@ -50,6 +50,7 @@ export async function onDropImage(file: File, x: number, y: number, room: Room): const { width, height } = await getSize; room.insertImage({ uuid, centerX: x, centerY: y, width, height, locked: false }); room.completeImageUpload(uuid, cloudFile.fileURL); + room.setMemberState({ currentApplianceName: ApplianceNames.selector }); } export function getImageSize(file: File): Promise {