Skip to content

Commit 9514d1e

Browse files
author
Brandon Vigne
committed
Fix zIndex to allow Draggable being rendered on top of others
Mentionned in #90
1 parent 502f92d commit 9514d1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Draggable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ export default function Draggable(props) {
179179
left: 0,
180180
width: Window.width,
181181
height: Window.height,
182+
elevation: z,
183+
zIndex: z,
182184
};
183185
}, []);
184186

185187
const dragItemCss = React.useMemo(() => {
186188
const style = {
187189
top: y,
188190
left: x,
189-
elevation: z,
190-
zIndex: z,
191191
};
192192
if (renderColor) {
193193
style.backgroundColor = renderColor;

Draggable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ export default function Draggable(props: IProps) {
211211
left: 0,
212212
width: Window.width,
213213
height: Window.height,
214+
elevation: z,
215+
zIndex: z,
214216
};
215217
}, []);
216218

217219
const dragItemCss = React.useMemo(() => {
218220
const style: StyleProp<ViewStyle> = {
219221
top: y,
220222
left: x,
221-
elevation: z,
222-
zIndex: z,
223223
};
224224
if (renderColor) {
225225
style.backgroundColor = renderColor;

0 commit comments

Comments
 (0)