Explorar el Código

fixed a bug (#9540)

* fixed a bug

if TouchEvent is not defined in the browser,an exception will be thrown,cause else branch statements not to be executed.

* fixed a bug

Check whether 'TouchEvent' is defined in the browser.

* trims extra spaces
Hu Jiulong hace 9 años
padre
commit
ae9a3e426a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      examples/js/controls/TransformControls.js

+ 1 - 1
examples/js/controls/TransformControls.js

@@ -1113,7 +1113,7 @@
 
 			_dragging = false;
 
-			if ( event instanceof TouchEvent ) {
+			if ( 'TouchEvent' in window && event instanceof TouchEvent ) {
 
 				// Force "rollover"