Skip to content

Commit

Permalink
fix drawer side "right" margin progressively increase (#352)
Browse files Browse the repository at this point in the history
* fix drawer side "right" margin progressively increase

* fix drawer side "right" margin progressively increase iPhone X
  • Loading branch information
mtiziano authored and rt2zz committed Oct 2, 2018
1 parent 5afddb3 commit 96a79b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Expand Up @@ -280,6 +280,7 @@ export default class Drawer extends Component {
let length = this._prevLength + delta
length = Math.min(length, this.getOpenLength())
length = Math.max(length, this.getClosedLength())
length = Math.round(length*2)/2
this._length = length

this.updatePosition()
Expand Down Expand Up @@ -397,7 +398,7 @@ export default class Drawer extends Component {
duration: this.props.tweenDuration,
easingType: this.props.tweenEasing,
onFrame: (tweenValue) => {
this._length = tweenValue
this._length = Math.round(tweenValue*2)/2;
this.updatePosition()
},
onEnd: () => {
Expand Down Expand Up @@ -431,7 +432,7 @@ export default class Drawer extends Component {
easingType: this.props.tweenEasing,
duration: this.props.tweenDuration,
onFrame: (tweenValue) => {
this._length = tweenValue
this._length = Math.round(tweenValue*2)/2;
this.updatePosition()
},
onEnd: () => {
Expand Down

0 comments on commit 96a79b8

Please sign in to comment.