Преглед изворни кода

if values were 0, it wouldn't have passed
checking for null is enough, as the values are being initialized at construction (and set to null)

Raanan Weber пре 7 година
родитељ
комит
171dcfb1d7
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      src/Cameras/babylon.arcRotateCamera.ts

+ 4 - 4
src/Cameras/babylon.arcRotateCamera.ts

@@ -573,17 +573,17 @@
                 }
             }
 
-            if (this.lowerAlphaLimit && this.alpha < this.lowerAlphaLimit) {
+            if (this.lowerAlphaLimit !== null && this.alpha < this.lowerAlphaLimit) {
                 this.alpha = this.lowerAlphaLimit;
             }
-            if (this.upperAlphaLimit && this.alpha > this.upperAlphaLimit) {
+            if (this.upperAlphaLimit !== null && this.alpha > this.upperAlphaLimit) {
                 this.alpha = this.upperAlphaLimit;
             }
 
-            if (this.lowerRadiusLimit && this.radius < this.lowerRadiusLimit) {
+            if (this.lowerRadiusLimit !== null && this.radius < this.lowerRadiusLimit) {
                 this.radius = this.lowerRadiusLimit;
             }
-            if (this.upperRadiusLimit && this.radius > this.upperRadiusLimit) {
+            if (this.upperRadiusLimit !== null && this.radius > this.upperRadiusLimit) {
                 this.radius = this.upperRadiusLimit;
             }
         }