mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(refresher): add elastic drag to native scrolling refresher
This commit is contained in:
@@ -47,7 +47,7 @@ describe('$ionicRefresh Controller', function() {
|
||||
ctrl.__handleTouchmove(evt(0));
|
||||
ctrl.__handleTouchmove(evt(10));
|
||||
ctrl.__handleTouchmove(evt(20));
|
||||
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(10px)');
|
||||
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(3px)');
|
||||
expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(true);
|
||||
expect(refresher.classList.contains('invisible')).toBe(false);
|
||||
});
|
||||
@@ -75,8 +75,8 @@ describe('$ionicRefresh Controller', function() {
|
||||
|
||||
ctrl.__handleTouchmove(evt(0));
|
||||
ctrl.__handleTouchmove(evt(10));
|
||||
ctrl.__handleTouchmove(evt(100));
|
||||
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(90px)');
|
||||
ctrl.__handleTouchmove(evt(300));
|
||||
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(96px)');
|
||||
expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(true);
|
||||
expect(refresher.classList.contains('invisible')).toBe(false);
|
||||
expect(refresher.classList.contains('active')).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user