Browse Source

Merge pull request #4694 from RaananW/arcrotate-null-check

if values were 0, it wouldn't have passed
David Catuhe 7 năm trước cách đây
mục cha
commit
6544584dcd
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  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;
             }
         }