Explorar o 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 %!s(int64=9) %!d(string=hai) anos
pai
achega
ae9a3e426a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/js/controls/TransformControls.js

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

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