@sdcx/bottom-sheet 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
if (pan.state == UIGestureRecognizerStateEnded) {
|
|
161
|
+
if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateCancelled) {
|
|
162
162
|
if (self.lastDragDistance > 0) {
|
|
163
163
|
if (self.target && self.target.contentOffset.y <= 0) {
|
|
164
164
|
//如果是类似轻扫的那种
|
|
@@ -307,6 +307,11 @@
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
- (void)stopWatchBottomSheetTransition {
|
|
310
|
+
if ([self.state isEqualToString:@"collapsed"]) {
|
|
311
|
+
[self dispatchOnSlide:self.maxY];
|
|
312
|
+
} else if ([self.state isEqualToString:@"expanded"]) {
|
|
313
|
+
[self dispatchOnSlide:self.minY];
|
|
314
|
+
}
|
|
310
315
|
if(_displayLink){
|
|
311
316
|
[_displayLink invalidate];
|
|
312
317
|
_displayLink = nil;
|