Skip to content

Commit

Permalink
Fix zIndex to allow Draggable being rendered on top of others
Browse files Browse the repository at this point in the history
Mentionned in #90
  • Loading branch information
Brandon Vigne committed Dec 6, 2023
1 parent 502f92d commit 9514d1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Draggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,15 @@ export default function Draggable(props) {
left: 0,
width: Window.width,
height: Window.height,
elevation: z,
zIndex: z,
};
}, []);

const dragItemCss = React.useMemo(() => {
const style = {
top: y,
left: x,
elevation: z,
zIndex: z,
};
if (renderColor) {
style.backgroundColor = renderColor;
Expand Down
4 changes: 2 additions & 2 deletions Draggable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,15 @@ export default function Draggable(props: IProps) {
left: 0,
width: Window.width,
height: Window.height,
elevation: z,
zIndex: z,
};
}, []);

const dragItemCss = React.useMemo(() => {
const style: StyleProp<ViewStyle> = {
top: y,
left: x,
elevation: z,
zIndex: z,
};
if (renderColor) {
style.backgroundColor = renderColor;
Expand Down

0 comments on commit 9514d1e

Please sign in to comment.