Browse Source

modify not to break mobile support

shunp 5 năm trước cách đây
mục cha
commit
c759dcb8d0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      examples/webgl_multiple_scenes_comparison.html

+ 1 - 1
examples/webgl_multiple_scenes_comparison.html

@@ -163,7 +163,7 @@
 
 					sliderMoved = true;
 
-					sliderPos = e.pageX;
+					sliderPos = ( e.pageX === undefined ) ? e.touches[ 0 ].pageX : e.pageX;
 
 					//prevent the slider from being positioned outside the window bounds
 					if ( sliderPos < 0 ) sliderPos = 0;