Skip to content

Commit

Permalink
fix: add wip alerts for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mournfulCoroner committed Dec 10, 2024
1 parent 7a6f596 commit 732b13c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Sheet/SheetContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS
}

if ((prevProps.visible && !visible) || this.shouldClose(prevProps)) {
alert('component did update close');
this.hide();
}

Expand Down Expand Up @@ -353,13 +354,15 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS
const accelerationY = this.velocityTracker.getYAcceleration();

if (this.sheetHeight <= deltaY) {
alert('< delte hide sheet');
this.props.hideSheet();
} else if (
(deltaY > HIDE_THRESHOLD &&
accelerationY <= ACCELERATION_Y_MAX &&
accelerationY >= ACCELERATION_Y_MIN) ||
accelerationY > ACCELERATION_Y_MAX
) {
alert('> delte hide');
this.hide();
} else if (deltaY !== 0) {
this.show();
Expand Down Expand Up @@ -396,13 +399,15 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS

private onVeilClick = () => {
this.setState({veilTouched: true});
alert('veil touched hide');
this.hide();
};

private onVeilTransitionEnd = () => {
this.setState({isAnimating: false});

if (this.veilOpacity === '0') {
alert('veil opacity is 0 hide sheet');
this.props.hideSheet();
}
};
Expand Down

0 comments on commit 732b13c

Please sign in to comment.