Skip to content

Commit 8335b95

Browse files
committed
fix: fix when joinRoom set strokeColor
1 parent 7dfd943 commit 8335b95

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

packages/fastboard-core/src/impl/FastboardApp.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -848,13 +848,11 @@ export async function createFastboard<TEventData extends Record<string, any> = a
848848
if (room.isWritable && ((room as any).floatBarOptions as FloatBarOptions)?.colors.length) {
849849
const colors = (room as any).floatBarOptions?.colors;
850850
const length = colors.length;
851-
(room as any).getRoomMembers().map((c: RoomMember) => {
852-
const index = c.memberId % length;
853-
const color = colors[index];
854-
manager.mainView.setMemberState({
855-
strokeColor: color,
856-
textColor: color,
857-
});
851+
const index = room.observerId % length;
852+
const color = colors[index];
853+
manager.mainView.setMemberState({
854+
strokeColor: color,
855+
textColor: color,
858856
});
859857
}
860858
manager.mainView.setCameraBound({

0 commit comments

Comments
 (0)