mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: emitted visible scene bounds not accounting for offsets (#7450)
This commit is contained in:
parent
561e919a2e
commit
6dfa89e846
8 changed files with 82 additions and 54 deletions
|
@ -184,7 +184,7 @@ class Portal {
|
|||
broadcastIdleChange = (userState: UserIdleState) => {
|
||||
if (this.socket?.id) {
|
||||
const data: SocketUpdateDataSource["IDLE_STATUS"] = {
|
||||
type: "IDLE_STATUS",
|
||||
type: WS_SUBTYPES.IDLE_STATUS,
|
||||
payload: {
|
||||
socketId: this.socket.id,
|
||||
userState,
|
||||
|
@ -204,7 +204,7 @@ class Portal {
|
|||
}) => {
|
||||
if (this.socket?.id) {
|
||||
const data: SocketUpdateDataSource["MOUSE_LOCATION"] = {
|
||||
type: "MOUSE_LOCATION",
|
||||
type: WS_SUBTYPES.MOUSE_LOCATION,
|
||||
payload: {
|
||||
socketId: this.socket.id,
|
||||
pointer: payload.pointer,
|
||||
|
@ -222,19 +222,19 @@ class Portal {
|
|||
}
|
||||
};
|
||||
|
||||
broadcastUserViewportBounds = (
|
||||
broadcastVisibleSceneBounds = (
|
||||
payload: {
|
||||
bounds: [number, number, number, number];
|
||||
sceneBounds: SocketUpdateDataSource["USER_VISIBLE_SCENE_BOUNDS"]["payload"]["sceneBounds"];
|
||||
},
|
||||
roomId: string,
|
||||
) => {
|
||||
if (this.socket?.id) {
|
||||
const data: SocketUpdateDataSource["USER_VIEWPORT_BOUNDS"] = {
|
||||
type: WS_SUBTYPES.USER_VIEWPORT_BOUNDS,
|
||||
const data: SocketUpdateDataSource["USER_VISIBLE_SCENE_BOUNDS"] = {
|
||||
type: WS_SUBTYPES.USER_VISIBLE_SCENE_BOUNDS,
|
||||
payload: {
|
||||
socketId: this.socket.id,
|
||||
username: this.collab.state.username,
|
||||
bounds: payload.bounds,
|
||||
sceneBounds: payload.sceneBounds,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue