Skip to content

Commit ee04ff1

Browse files
prateekbhskipjack
authored andcommitted
bug fixes and more friendly touch responses
1 parent 71fcf6c commit ee04ff1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/sidebar-mobile/sidebar-mobile-style.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
.opener{
3030
position: absolute;
31-
top: 0;
31+
top: 45px;
3232
bottom: 0;
33-
width: 10px;
33+
width: 32px;
3434
left: 285px;
3535
}
3636

components/sidebar-mobile/sidebar-mobile.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class SidebarMobile extends React.Component {
123123

124124
_handleTouchStart(e){
125125
initialTouchPosition.x = e.touches[0].pageX;
126-
initialTouchPosition.y = e.touches[0].clientY;
126+
initialTouchPosition.y = e.touches[0].pageY;
127127
//for instant transform along with the touch
128128
this.container.classList.add("no-delay");
129129
}
@@ -137,7 +137,7 @@ export default class SidebarMobile extends React.Component {
137137
e.preventDefault();
138138
this.container.style.transform="translateX(-"+xDiff+"px)";
139139
lastTouchPosition.x = e.touches[0].pageX;
140-
lastTouchPosition.y = e.touches[0].clientY;
140+
lastTouchPosition.y = e.touches[0].pageY;
141141
}
142142
}
143143

@@ -150,7 +150,7 @@ export default class SidebarMobile extends React.Component {
150150
e.preventDefault();
151151
this.container.style.transform="translateX(calc(-100% + "+xDiff+"px))";
152152
lastTouchPosition.x = e.touches[0].pageX;
153-
lastTouchPosition.y = e.touches[0].clientY;
153+
lastTouchPosition.y = e.touches[0].pageY;
154154
}
155155
}
156156

0 commit comments

Comments
 (0)