Browse Source

Fixing missing parameter on arcRotateCamera

David Catuhe 9 năm trước cách đây
mục cha
commit
26404f0e09

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 16 - 16
dist/preview release/babylon.core.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2171 - 2171
dist/preview release/babylon.d.ts


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 22 - 22
dist/preview release/babylon.js


+ 7 - 3
dist/preview release/babylon.max.js

@@ -11221,7 +11221,9 @@ var BABYLON;
             }
         };
         CameraInputsManager.prototype.clear = function () {
-            this.detachElement(this.attachedElement);
+            if (this.attachedElement) {
+                this.detachElement(this.attachedElement);
+            }
             this.attached = {};
             this.attachedElement = null;
             this.checkInputs = function () { };
@@ -11713,7 +11715,9 @@ var BABYLON;
             this._gamepads = new BABYLON.Gamepads(function (gamepad) { _this._onNewGameConnected(gamepad); });
         };
         FreeCameraGamepadInput.prototype.detachControl = function (element) {
-            this._gamepads.dispose();
+            if (this._gamepads) {
+                this._gamepads.dispose();
+            }
             this.gamepad = null;
         };
         FreeCameraGamepadInput.prototype.checkInputs = function () {
@@ -13141,7 +13145,7 @@ var BABYLON;
                 return;
             }
             this._attachedElement = element;
-            this._noPreventDefault = noPreventDefault;
+            this._noPreventDefault = BABYLON.Camera.ForceAttachControlToAlwaysPreventDefault ? false : noPreventDefault;
             this._useCtrlForPanning = useCtrlForPanning;
             this.inputs.attachElement(element, noPreventDefault);
             this._reset = function () {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 21 - 21
dist/preview release/babylon.noworker.js


+ 1 - 1
src/Cameras/babylon.arcRotateCamera.js

@@ -262,7 +262,7 @@ var BABYLON;
                 return;
             }
             this._attachedElement = element;
-            this._noPreventDefault = noPreventDefault;
+            this._noPreventDefault = BABYLON.Camera.ForceAttachControlToAlwaysPreventDefault ? false : noPreventDefault;
             this._useCtrlForPanning = useCtrlForPanning;
             this.inputs.attachElement(element, noPreventDefault);
             this._reset = function () {

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

@@ -261,7 +261,7 @@
                 return;
             }
             this._attachedElement = element;
-            this._noPreventDefault = noPreventDefault;
+            this._noPreventDefault = Camera.ForceAttachControlToAlwaysPreventDefault ? false : noPreventDefault;
             this._useCtrlForPanning = useCtrlForPanning;
 
             this.inputs.attachElement(element, noPreventDefault);