Change of approach

This commit is contained in:
Scroody 2023-05-09 15:51:35 -03:00
parent 46b9cfa1e2
commit cdfa38ad85
3 changed files with 3 additions and 7 deletions

View File

@ -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;
};

View File

@ -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,

View File

@ -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;