@@ -166,15 +166,8 @@ export const toolOverlay = {
166
166
if ( target . matches ( '#move' ) === false ) { return ; }
167
167
if ( dom . cl . has ( this . moveable , 'moving' ) ) { return ; }
168
168
target . setPointerCapture ( ev . pointerId ) ;
169
- this . moverIsTouch = ev . type . startsWith ( 'touch' ) ;
170
- if ( this . moverIsTouch ) {
171
- const touch = ev . touches [ 0 ] ;
172
- this . moverX0 = touch . pageX ;
173
- this . moverY0 = touch . pageY ;
174
- } else {
175
- this . moverX0 = ev . pageX ;
176
- this . moverY0 = ev . pageY ;
177
- }
169
+ this . moverX0 = ev . pageX ;
170
+ this . moverY0 = ev . pageY ;
178
171
const rect = this . moveable . getBoundingClientRect ( ) ;
179
172
this . moverCX0 = rect . x + rect . width / 2 ;
180
173
this . moverCY0 = rect . y + rect . height / 2 ;
@@ -211,14 +204,8 @@ export const toolOverlay = {
211
204
}
212
205
} ,
213
206
moverMoveAsync ( ev ) {
214
- if ( toolOverlay . moverIsTouch ) {
215
- const touch = ev . touches [ 0 ] ;
216
- toolOverlay . moverX1 = touch . pageX ;
217
- toolOverlay . moverY1 = touch . pageY ;
218
- } else {
219
- toolOverlay . moverX1 = ev . pageX ;
220
- toolOverlay . moverY1 = ev . pageY ;
221
- }
207
+ toolOverlay . moverX1 = ev . pageX ;
208
+ toolOverlay . moverY1 = ev . pageY ;
222
209
if ( toolOverlay . moverTimer !== undefined ) { return ; }
223
210
toolOverlay . moverTimer = self . requestAnimationFrame ( ( ) => {
224
211
toolOverlay . moverMove ( ) ;
@@ -241,7 +228,6 @@ export const toolOverlay = {
241
228
ev . preventDefault ( ) ;
242
229
} ,
243
230
moveable : null ,
244
- moverIsTouch : false ,
245
231
moverX0 : 0 , moverY0 : 0 ,
246
232
moverX1 : 0 , moverY1 : 0 ,
247
233
moverCX0 : 0 , moverCY0 : 0 ,
0 commit comments