Skip to content

Commit

Permalink
Fix the issue related to drawing overlapping annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinNagpal committed Nov 16, 2021
1 parent e8214a0 commit 7d94c43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Shapes/withShapeWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const withShapeWrapper = (
annotation,
children,
editorMode,
isInSelectionMode,
renderContent,
selectedAnnotation,
style,
Expand All @@ -35,6 +36,8 @@ export const withShapeWrapper = (
}
};

const shapeStyle = isInSelectionMode ? { zIndex: 0, ...(style || {}) } : {};

return (
<div onClick={onClick}>
<DecoratedShape
Expand All @@ -48,7 +51,7 @@ export const withShapeWrapper = (
}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
style={style}
style={shapeStyle}
/>

{reactContentElement}
Expand Down

0 comments on commit 7d94c43

Please sign in to comment.