Sfoglia il codice sorgente

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 anni fa
parent
commit
171dcfb1d7
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  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;
             }
         }