From 1921817634a534e9e302a0225df77656154777cf Mon Sep 17 00:00:00 2001 From: leutinatasya Date: Tue, 10 Dec 2024 18:34:17 +0300 Subject: [PATCH] Revert "fix: comment extra code" This reverts commit 848c35fda5eb571d34e3244b16340551aab63347. --- src/components/Sheet/SheetContent.tsx | 58 ++++++++++++++------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/src/components/Sheet/SheetContent.tsx b/src/components/Sheet/SheetContent.tsx index 29d30700c..62dc4ae09 100644 --- a/src/components/Sheet/SheetContent.tsx +++ b/src/components/Sheet/SheetContent.tsx @@ -78,11 +78,11 @@ class SheetContent extends React.Component { - // this.textLog += 'hide there\n'; + this.textLog += 'hide there\n'; this.setState({isAnimating: true}, () => { this.setStyles({status: 'hiding'}); this.removeHash(); @@ -363,6 +363,7 @@ class SheetContent extends React.Component HIDE_THRESHOLD && @@ -370,6 +371,7 @@ class SheetContent extends React.Component= ACCELERATION_Y_MIN) || accelerationY > ACCELERATION_Y_MAX ) { + alert('> delte hide'); this.hide(); } else if (deltaY !== 0) { this.show(); @@ -405,15 +407,15 @@ class SheetContent extends React.Component { - // this.textLog += `${this.isResizing} is resizing\n`; - // if (this.isResizing) { - // this.needHide = true; - // return; - // } + this.textLog += `${this.isResizing} is resizing\n`; + if (this.isResizing) { + this.needHide = true; + return; + } this.setState({veilTouched: true}); this.hide(); - // this.textLog += 'veil touched hide\n'; + this.textLog += 'veil touched hide\n'; }; private onVeilTransitionEnd = () => { @@ -433,8 +435,8 @@ class SheetContent extends React.Component { - // this.textLog += `${this.state.veilTouched} this.state.veilTouched\n`; - // this.textLog += `${this.isMounted} this.state.inWindowResizeScope\n`; + this.textLog += `${this.state.veilTouched} this.state.veilTouched\n`; + this.textLog += `${this.isMounted} this.state.inWindowResizeScope\n`; if (this.state.veilTouched) { return; } @@ -444,7 +446,7 @@ class SheetContent extends React.Component { - // this.isResizing = false; - // if (this.needHide) { - // this.textLog += 'needHide\n'; - // this.onVeilClick(); - // } + this.isResizing = false; + if (this.needHide) { + this.textLog += 'needHide\n'; + this.onVeilClick(); + } }); };