Browse Source

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 9 years ago
parent
commit
ae9a3e426a
1 changed files with 1 additions and 1 deletions
  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"