Skip to content

Commit c7e61e4

Browse files
committed
Merge pull request #6360 from vitaliy-bobrov/#6016-transform3d
Change translateY to 3d
2 parents e0cade4 + 529ca54 commit c7e61e4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: js/angular/controller/refresherController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ IonicModule
170170
}
171171

172172
function overscroll(val) {
173-
scrollChild.style[ionic.CSS.TRANSFORM] = 'translateY(' + val + 'px)';
173+
scrollChild.style[ionic.CSS.TRANSFORM] = 'translate3d(0, ' + val + 'px, 0)';
174174
lastOverscroll = val;
175175
}
176176

Diff for: test/unit/angular/controller/refreshController.unit.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('$ionicRefresh Controller', function() {
4747
setup();
4848

4949
function getTy(el) {
50-
return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translateY(', ''));
50+
return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0px, ', ''));
5151
}
5252

5353
ctrl.__handleTouchmove(evt(0));
@@ -68,14 +68,14 @@ describe('$ionicRefresh Controller', function() {
6868
ctrl.__handleTouchmove(evt(10));
6969
expect(refresher.classList.contains('invisible')).toBe(false);
7070
ctrl.__handleTouchmove(evt(0));
71-
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(0px)');
71+
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0px, 0px, 0px)');
7272
expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(false);
7373
expect(refresher.classList.contains('invisible')).toBe(true);
7474
});
7575

7676
it('should activate and deactivate when dragging past activation threshold', function() {
7777
function getTy(el) {
78-
return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translateY(', ''));
78+
return parseInt(el.style[ionic.CSS.TRANSFORM].replace('translate3d(0px, ', ''));
7979
}
8080
setup();
8181
var domMethods = ctrl.getRefresherDomMethods();
@@ -92,7 +92,7 @@ describe('$ionicRefresh Controller', function() {
9292

9393
ctrl.__handleTouchmove(evt(0));
9494
timeout.flush();
95-
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translateY(0px)');
95+
expect(ctrl.__getScrollChild().style[ionic.CSS.TRANSFORM]).toBe('translate3d(0px, 0px, 0px)');
9696
expect(ctrl.__getScrollChild().classList.contains('overscroll')).toBe(false);
9797
expect(refresher.classList.contains('invisible')).toBe(true);
9898
expect(refresher.classList.contains('active')).toBe(false);

0 commit comments

Comments
 (0)