Skip to content

Commit f489c47

Browse files
committed
use absolute
1 parent 0f42ffa commit f489c47

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

assets/index.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,15 @@
1313
opacity: 0;
1414
width: 100%;
1515
height: 0;
16-
position: fixed;
16+
position: absolute;
1717
top: 0;
1818
left: 0;
1919
transition: opacity @duration @ease-in-out-circ,
2020
height 0s ease @duration;
2121
}
2222
&-content-wrapper {
23-
position: fixed;
23+
position: absolute;
2424
background: #fff;
25-
2625
}
2726
&-content {
2827
overflow: auto;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-drawer",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "drawer component for react",
55
"keywords": [
66
"react",

src/DrawerChild.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ class DrawerChild extends React.Component<IDrawerChildProps, IState> {
336336
let widthTransition = `width ${duration} ${ease}`;
337337
const transformTransition = `transform ${duration} ${ease}`;
338338
switch (placement) {
339+
case 'left': {
340+
this.dom.style.width = '100%';
341+
widthTransition = `width 0s ${ease} ${duration}`;
342+
break;
343+
}
339344
case 'right': {
340345
this.dom.style.transform = `translateX(${right}px)`;
341346
this.dom.style.width = '100%';

0 commit comments

Comments
 (0)