@@ -354,7 +354,7 @@ var OrbitControls = function ( object, domElement ) {
354
354
355
355
var element = scope . domElement === document ? scope . domElement . body : scope . domElement ;
356
356
357
- if ( scope . object . type == 'PerspectiveCamera' ) {
357
+ if ( scope . object . type === 'PerspectiveCamera' ) {
358
358
359
359
// perspective
360
360
var position = scope . object . position ;
@@ -368,7 +368,7 @@ var OrbitControls = function ( object, domElement ) {
368
368
panLeft ( 2 * deltaX * targetDistance / element . clientHeight , scope . object . matrix ) ;
369
369
panUp ( 2 * deltaY * targetDistance / element . clientHeight , scope . object . matrix ) ;
370
370
371
- } else if ( scope . object . type == 'OrthographicCamera' ) {
371
+ } else if ( scope . object . type === 'OrthographicCamera' ) {
372
372
373
373
// orthographic
374
374
panLeft ( deltaX * ( scope . object . right - scope . object . left ) / scope . object . zoom / element . clientWidth , scope . object . matrix ) ;
@@ -388,11 +388,11 @@ var OrbitControls = function ( object, domElement ) {
388
388
389
389
function dollyIn ( dollyScale ) {
390
390
391
- if ( scope . object . type == 'PerspectiveCamera' ) {
391
+ if ( scope . object . type === 'PerspectiveCamera' ) {
392
392
393
393
scale /= dollyScale ;
394
394
395
- } else if ( scope . object . type == 'OrthographicCamera' ) {
395
+ } else if ( scope . object . type === 'OrthographicCamera' ) {
396
396
397
397
scope . object . zoom = Math . max ( scope . minZoom , Math . min ( scope . maxZoom , scope . object . zoom * dollyScale ) ) ;
398
398
scope . object . updateProjectionMatrix ( ) ;
@@ -409,11 +409,11 @@ var OrbitControls = function ( object, domElement ) {
409
409
410
410
function dollyOut ( dollyScale ) {
411
411
412
- if ( scope . object . type == 'PerspectiveCamera' ) {
412
+ if ( scope . object . type === 'PerspectiveCamera' ) {
413
413
414
414
scale *= dollyScale ;
415
415
416
- } else if ( scope . object . type == 'OrthographicCamera' ) {
416
+ } else if ( scope . object . type === 'OrthographicCamera' ) {
417
417
418
418
scope . object . zoom = Math . max ( scope . minZoom , Math . min ( scope . maxZoom , scope . object . zoom / dollyScale ) ) ;
419
419
scope . object . updateProjectionMatrix ( ) ;
0 commit comments