File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -338,9 +338,14 @@ export default class extends Controller {
338338
339339 addEvents ( ) {
340340 this . slider . addEventListener ( "mousemove" , this . move . bind ( this ) ) ;
341+ this . slider . addEventListener ( "touchmove" , this . move . bind ( this ) ) ;
341342 this . slider . addEventListener ( "mouseup" , this . drop . bind ( this ) ) ;
343+ this . slider . addEventListener ( "touchend" , this . drop . bind ( this ) ) ;
344+ this . slider . addEventListener ( "touchcancel" , this . drop . bind ( this ) ) ;
342345 this . pointerL . addEventListener ( "mousedown" , this . drag . bind ( this ) ) ;
346+ this . pointerL . addEventListener ( "touchstart" , this . drag . bind ( this ) ) ;
343347 this . pointerR ?. addEventListener ( "mousedown" , this . drag . bind ( this ) ) ;
348+ this . pointerR ?. addEventListener ( "touchstart" , this . drag . bind ( this ) ) ;
344349 window . addEventListener ( "resize" , this . onResize . bind ( this ) ) ;
345350
346351 const pieces = this . slider . querySelectorAll ( "span" ) ;
You can’t perform that action at this time.
0 commit comments