Change of approach
This commit is contained in:
parent
46b9cfa1e2
commit
cdfa38ad85
@ -50,7 +50,8 @@ const WhiteboardContainer = (props) => {
|
||||
const hasShapeAccess = (id) => {
|
||||
const owner = shapes[id]?.userId;
|
||||
const isBackgroundShape = id?.includes('slide-background');
|
||||
const hasAccess = !isBackgroundShape
|
||||
const isPollsResult = shapes[id]?.name?.includes('poll-result');
|
||||
const hasAccess = !isBackgroundShape && !isPollsResult
|
||||
&& ((owner && owner === currentUser?.userId) || !owner || isPresenter || isModerator);
|
||||
return hasAccess;
|
||||
};
|
||||
|
@ -315,9 +315,8 @@ const getShapes = (whiteboardId, curPageId, intl) => {
|
||||
const textSize = getTextSize(pollResult, style, padding = 20);
|
||||
|
||||
modAnnotation.annotationInfo = {
|
||||
isLocked: true,
|
||||
childIndex: 0,
|
||||
id: `poll-result-${annotation.annotationInfo.id}`,
|
||||
id: annotation.annotationInfo.id,
|
||||
name: `poll-result-${annotation.annotationInfo.id}`,
|
||||
type: 'rectangle',
|
||||
label: pollResult,
|
||||
|
@ -7,10 +7,6 @@ import {
|
||||
import Button from '/imports/ui/components/common/button/component';
|
||||
|
||||
const TldrawGlobalStyle = createGlobalStyle`
|
||||
div[id^="poll-result-"] * {
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
${({ hideContextMenu }) => hideContextMenu && `
|
||||
#TD-ContextMenu {
|
||||
display: none;
|
||||
|
Loading…
Reference in New Issue
Block a user