2023-03-10 19:30:46 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import React from 'react';
|
2022-07-07 01:17:05 +08:00
|
|
|
import SettingsService from '/imports/ui/services/settings';
|
2023-03-10 19:30:46 +08:00
|
|
|
import Cursors from './component';
|
|
|
|
import Service from './service';
|
2023-02-21 21:29:51 +08:00
|
|
|
import { omit } from 'radash';
|
2022-04-05 22:49:13 +08:00
|
|
|
|
2023-04-05 20:42:05 +08:00
|
|
|
const CursorsContainer = (props) => <Cursors {...omit(props, ['tldrawAPI'])} />;
|
2022-04-05 22:49:13 +08:00
|
|
|
|
2023-03-10 19:30:46 +08:00
|
|
|
export default withTracker((params) => (
|
|
|
|
{
|
|
|
|
application: SettingsService?.application,
|
|
|
|
currentUser: params.currentUser,
|
|
|
|
publishCursorUpdate: Service.publishCursorUpdate,
|
|
|
|
otherCursors: Service.getCurrentCursors(params.whiteboardId),
|
|
|
|
currentPoint: params.tldrawAPI?.currentPoint,
|
|
|
|
tldrawCamera: params.tldrawAPI?.getPageState().camera,
|
|
|
|
isViewersCursorLocked: params.isViewersCursorLocked,
|
|
|
|
hasMultiUserAccess: params.hasMultiUserAccess,
|
|
|
|
isMultiUserActive: params.isMultiUserActive,
|
|
|
|
}
|
|
|
|
))(CursorsContainer);
|